GMSRoadSnappedLocationProvider Class Reference

GMSRoadSnappedLocationProvider Class Reference

Overview

Provides updates of the device's location.

This class functions similarly to CLLocationManager, except that if the device is in driving mode, the location updates is 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 device's road-snapped location.
(void) - stopUpdatingLocation
 Stops updating the device'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 device'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 device location, stopUpdatingLocation should be called when road-snapped location is no longer required.

Stops updating the device's road-snapped location.

In order to avoid battery drain or unintended logging of device 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.