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
- (void) addListener: | (id< GMSRoadSnappedLocationProviderListener >) | listener |
Adds a listener.
The listener is held with a weak reference.
- Parameters:
-
listener An object conforming to the GMSRoadSnappedLocationProviderListener
protocol.
- (BOOL) removeListener: | (id< GMSRoadSnappedLocationProviderListener >) | listener |
Removes a listener.
- Parameters:
-
listener An object conforming to the GMSRoadSnappedLocationProviderListener
protocol.
- Returns:
- Returns YES if the listener was removed. Returns NO if the object was not a listener.
- (void) startUpdatingLocation |
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.
- (void) stopUpdatingLocation |
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.