GMSRoadSnappedLocationProvider
@interface GMSRoadSnappedLocationProvider : NSObjectProvides 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.
- 
                  
                  Unavailable DeclarationObjective-C - (instancetype)init NS_UNAVAILABLE;
- 
                  
                  Adds a listener. The listener is held with a weak reference. DeclarationSwift func add(_ listener: any GMSRoadSnappedLocationProviderListener)Objective-C - (void)addListener: (nonnull id<GMSRoadSnappedLocationProviderListener>)listener;ParameterslistenerAn object conforming to the GMSRoadSnappedLocationProviderListenerprotocol.
- 
                  
                  Removes a listener. DeclarationSwift func remove(_ listener: any GMSRoadSnappedLocationProviderListener) -> BoolObjective-C - (BOOL)removeListener: (nonnull id<GMSRoadSnappedLocationProviderListener>)listener;ParameterslistenerAn object conforming to the GMSRoadSnappedLocationProviderListenerprotocol.Return ValueReturns 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, -stopUpdatingLocationshould be called when road-snapped location is no longer required.DeclarationSwift func startUpdatingLocation()Objective-C - (void)startUpdatingLocation;
- 
                  
                  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. DeclarationSwift func stopUpdatingLocation()Objective-C - (void)stopUpdatingLocation;
- 
                  
                  Whether the delegate should still receive location updates when the app is in the background. Defaults to NO. DeclarationSwift var allowsBackgroundLocationUpdates: Bool { get set }Objective-C @property (nonatomic) BOOL allowsBackgroundLocationUpdates;