DingiLocationManagerDelegate

@protocol DingiLocationManagerDelegate <NSObject>

The DingiLocationManagerDelegate protocol defines a set of methods that respond to location updates from an DingiLocationManager object that is serving as the location manager of an DingiMapView.

  • Notifies the delegate with the new location data.

    Declaration

    Objective-C

    - (void)locationManager:(nonnull id<DingiLocationManager>)manager
         didUpdateLocations:(nonnull NSArray<CLLocation *> *)locations;

    Swift

    func locationManager(_ manager: DingiLocationManager, didUpdate locations: [CLLocation])

    Parameters

    manager

    The location manager reporting the update.

    locations

    An array of CLLocation objects in chronological order, with the last object representing the most recent location. This array contains multiple CLLocation objects when DingiMapView uses its default location manager.

  • Notifies the delegate with the new heading data.

    Declaration

    Objective-C

    - (void)locationManager:(nonnull id<DingiLocationManager>)manager
           didUpdateHeading:(nonnull CLHeading *)newHeading;

    Swift

    func locationManager(_ manager: DingiLocationManager, didUpdate newHeading: CLHeading)

    Parameters

    manager

    The location manager reporting the update.

    newHeading

    The new heading update.

  • Asks the delegate if the calibration alert should be displayed.

    Declaration

    Objective-C

    - (BOOL)locationManagerShouldDisplayHeadingCalibration:
        (nonnull id<DingiLocationManager>)manager;

    Swift

    func locationManagerShouldDisplayHeadingCalibration(_ manager: DingiLocationManager) -> Bool

    Parameters

    manager

    The location manager reporting the calibration.

  • Notifies the delegate that the location manager was unable to retrieve location updates.

    Declaration

    Objective-C

    - (void)locationManager:(nonnull id<DingiLocationManager>)manager
           didFailWithError:(nonnull NSError *)error;

    Swift

    func locationManager(_ manager: DingiLocationManager, didFailWithError error: Error)

    Parameters

    manager

    The location manager reporting the error.

    error

    An error object containing the error code that indicates why the location manager failed.