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
managerThe location manager reporting the update.
locationsAn array of
CLLocationobjects in chronological order, with the last object representing the most recent location. This array contains multipleCLLocationobjects whenDingiMapViewuses 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
managerThe location manager reporting the update.
newHeadingThe 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) -> BoolParameters
managerThe 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
managerThe location manager reporting the error.
errorAn error object containing the error code that indicates why the location manager failed.
DingiLocationManagerDelegate Protocol Reference