Navigation SDK is currently available only to select customers. Contact sales to learn more.

GMSRoadSnappedLocationProvider Class Reference

Stay organized with collections Save and categorize content based on your preferences.
GMSRoadSnappedLocationProvider Class Reference

Overview

Provides updates of the user's location.

This class functions similarly to CLLocationManager, except that if the user is in driving mode, the location updates will be snapped to the nearest road.

This class is not intended for subclassing.

Public Member Functions

(void) - addListener:
 Adds a listener.
(BOOL) - removeListener:
 Removes a listener.
(void) - startUpdatingLocation
 Starts updating the user's road-snapped location.
(void) - stopUpdatingLocation
 Stops updating the user's road-snapped location.

Properties

BOOL allowsBackgroundLocationUpdates
 Whether the delegate should still receive location updates when the app is in the background.

Member Function Documentation

Adds a listener.

The listener is held with a weak reference.

Parameters:
listenerAn object conforming to the GMSRoadSnappedLocationProviderListener protocol.

Removes a listener.

Parameters:
listenerAn object conforming to the GMSRoadSnappedLocationProviderListener protocol.
Returns:
Returns YES if the listener was removed. Returns NO if the object was not a listener.

Starts updating the user's road-snapped location.

After this is called, the delegate will start receiving location update events.

In order to avoid battery drain or unintended logging of user location, stopUpdatingLocation should be called when road-snapped location is no longer required.

Stops updating the user's road-snapped location.

In order to avoid battery drain or unintended logging of user location, this method should be called when the listener is no longer required.


Property Documentation

- (BOOL) allowsBackgroundLocationUpdates [read, write, assign]

Whether the delegate should still receive location updates when the app is in the background.

Defaults to NO.