DingiLocationManager

@protocol DingiLocationManager <NSObject>

The DingiLocationManager protocol defines a set of methods that a class must implement in order to serve as the location manager of an DingiMapView. A location manager is responsible for notifying the map view about location-related events, such as a change in the user’s location. This protocol is similar to the Core Location framework’s CLLocationManager class, but your implementation does not need to be based on CLLocationManager.

To receive location updates from an object that conforms to the DingiLocationManager protocol, use the optional methods available in the DingiLocationManagerDelegate protocol.

  • Specifies the minimum distance (measured in meters) a device must move horizontally before a location update is generated.

    The default value of this property is kCLDistanceFilterNone when DingiMapView uses its default location manager.

    See

    CLLocationManager.distanceFilter

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) CLLocationDistance distanceFilter;

    Swift

    optional var distanceFilter: CLLocationDistance { get set }
  • Specifies the accuracy of the location data.

    The default value is kCLLocationAccuracyBest when DingiMapView uses its default location manager.

    Note

    Determining a location with greater accuracy requires more time and more power.

    See

    CLLocationManager.desiredAccuracy

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) CLLocationAccuracy desiredAccuracy;

    Swift

    optional var desiredAccuracy: CLLocationAccuracy { get set }
  • Specifies the type of user activity associated with the location updates.

    The location manager uses this property as a cue to determine when location updates may be automatically paused.

    The default value is CLActivityTypeOther when DingiMapView uses its default location manager.

    See

    CLLocationManager.activityType

    Declaration

    Objective-C

    @optional
    @property (assign, readwrite, nonatomic) CLActivityType activityType;

    Swift

    optional var activityType: CLActivityType { get set }
  • The delegate to receive location updates.

    Do not set the location manager’s delegate yourself. DingiMapView sets this property after the location manager becomes DingiMapView’s location manager.

    Declaration

    Objective-C

    @required
    @property (readwrite, nonatomic)
        id<DingiLocationManagerDelegate> _Nullable delegate;

    Swift

    weak var delegate: DingiLocationManagerDelegate? { get set }
  • Returns the current localization authorization status.

    See

    +[CLLocationManger authorizationStatus]

    Declaration

    Objective-C

    @required
    @property (readonly, nonatomic) CLAuthorizationStatus authorizationStatus;

    Swift

    var authorizationStatus: CLAuthorizationStatus { get }
  • Requests permission to use the location services whenever the app is running.

    Declaration

    Objective-C

    - (void)requestAlwaysAuthorization;

    Swift

    func requestAlwaysAuthorization()
  • Requests permission to use the location services while the app is in the foreground.

    Declaration

    Objective-C

    - (void)requestWhenInUseAuthorization;

    Swift

    func requestWhenInUseAuthorization()
  • Starts the generation of location updates that reports the user’s current location.

    Declaration

    Objective-C

    - (void)startUpdatingLocation;

    Swift

    func startUpdatingLocation()
  • Stops the generation of location updates.

    Declaration

    Objective-C

    - (void)stopUpdatingLocation;

    Swift

    func stopUpdatingLocation()
  • Specifies a physical device orientation.

    Declaration

    Objective-C

    @required
    @property (assign, readwrite, nonatomic) CLDeviceOrientation headingOrientation;

    Swift

    var headingOrientation: CLDeviceOrientation { get set }
  • Starts the generation of heading updates that reports the user’s current hading.

    Declaration

    Objective-C

    - (void)startUpdatingHeading;

    Swift

    func startUpdatingHeading()
  • Stops the generation of heading updates.

    Declaration

    Objective-C

    - (void)stopUpdatingHeading;

    Swift

    func stopUpdatingHeading()
  • Dissmisses immediately the heading calibration view from screen.

    Declaration

    Objective-C

    - (void)dismissHeadingCalibrationDisplay;

    Swift

    func dismissHeadingCalibrationDisplay()