VisioMove-Sample  2.1.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
VgMyCompassDataSource Class Reference

Controls the device's heading services. More...

Inherits NSObject.

Class Methods

(BOOL) + isCompassAvailable
 

Detailed Description

Controls the device's heading services.

The VgMyCompassDataSource uses iOS CLLocationManager to communicate with interested parties. Below is a list of Notifications that are observered/posted.

Observes:

  • VgMyCompassRequestNotification: when observed will try and align it's internal state with that requested
  • VgMyMapInteractionNotification: if the compass is enabled and this notification is received then the compass is disabled

Posts:

  • VgMyCompassDataNotification: when active will broadcast this signals as the devices heading changes
  • VgCompassNotification: will broadcast when the compass's state changes.

INTEGRATION GUIDE: In order for the compass data source to work, the follow steps need to be performed in the application:

  1. link the application with the CoreLocation.framework
  2. add the NSLocationWhenInUseUsageDescription key to the app's plist.
  3. add the VgMyCompassView to the apps interface (this allows the user to enable/disable the compass).
  4. add the VgMyMapViewResponder as a subview of the map view so it can capture map interaction events
  5. The map view must register to receive VgMyCompassDataNotification. This will be used for updating the maps heading.
Examples:
/Users/hbriceno/src/visioglobe/mobile/Projects/SDK/VisioDevKit/samples/navigationModule/Inc/Apple/VgMyViewController.h.

Method Documentation

+ (BOOL) isCompassAvailable
Returns
YES if the compass is available on the device, otherwise NO.

The documentation for this class was generated from the following file:
VisioMove 2.1.5, Visioglobe® 2015