MaplyLocationTracker

Undocumented

  • Exposes MaplyLocationTracker’s location manager for use elsewhere

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) CLLocationManager *locationManager;

    Swift

    var locationManager: CLLocationManager? { get }
  • MaplyLocationTracker constructor

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithViewC:(MaplyBaseViewController *_Nullable)viewC
         delegate:(NSObject<MaplyLocationTrackerDelegate> *_Nullable)delegate
       useHeading:(_Bool)useHeading
        useCourse:(_Bool)useCourse
         simulate:(_Bool)simulate;

    Swift

    init(viewC: MaplyBaseViewController?, delegate: (NSObjectProtocol 

    Parameters

    viewC

    The globe or map view controller

    delegate

    The MaplyLocationTrackerDelegate for receiving location event callbacks

    useHeading

    Use location services heading information (requires physical magnetometer)

    useCourse

    Use location services course information as fallback if heading unavailable

  • Change lock type

    Declaration

    Objective-C

    - (void)changeLockType:(MaplyLocationLockType)lockType
        forwardTrackOffset:(int)forwardTrackOffset;

    Swift

    func change(_ lockType: MaplyLocationLockType, forwardTrackOffset: Int32)

    Parameters

    lockType

    The MaplyLocationLockType value for lock behavior

    forwardTrackOffset

    The vertical offset if using MaplyLocationLockHeadingUpOffset (positive values are below the view center)

  • Stop the MaplyLocationTracker behavior and shut it down.

    Declaration

    Objective-C

    - (void)teardown;

    Swift

    func teardown()
  • Get the current device location

    Declaration

    Objective-C

    - (MaplyCoordinate)getLocation;

    Swift

    func getLocation() -> MaplyCoordinate

    Return Value

    The coordinate if valid, else kMaplyNullCoordinate