<GMSNavigatorListener> Protocol Reference

<GMSNavigatorListener> Protocol Reference

Overview

Listener for events on GMSNavigator.

Public Member Functions

(void) - navigator:didArriveAtWaypoint:
 Called when the driver has arrived at a GMSNavigationWaypoint.
(void) - navigatorDidChangeRoute:
 Called when the current route changes or is cleared.
(void) - navigator:didUpdateRemainingTime:
 Called when the estimated time(s) to the destination(s) are updated.
(void) - navigator:didUpdateRemainingDistance:
 Called when the estimated distance(s) to the destination(s) are updated.
(void) - navigator:didUpdateDelayCategory:
 Called when the delay category to the destination(s) are updated.
(void) - navigator:didChangeSuggestedLightingMode:
 Called when the estimated lighting conditions are updated, for example when night falls at the devices's current location.
(void) - navigator:didUpdateSpeedingPercentage:
 Notifies you that the driver is exceeding the speed limit by the specified percentage.
(void) - navigator:didUpdateSpeedAlertSeverity:speedingPercentage:
 Notifies you that the device has detected that the vehicle is exceeding the speed limit by the specified percentage along with the current speed alert severity.
(void) - navigator:didUpdateNavInfo:
 Called when the current GMSNavigationNavInfo is updated.

Member Function Documentation

- (void) navigator: (GMSNavigator *)  navigator
didArriveAtWaypoint: (GMSNavigationWaypoint *)  waypoint 
[optional]

Called when the driver has arrived at a GMSNavigationWaypoint.

Parameters:
waypointThe waypoint that was arrived at.
- (void) navigatorDidChangeRoute: (GMSNavigator *)  navigator [optional]

Called when the current route changes or is cleared.

Note that there are several types of triggers for this listener, including but not limited to:

  • the in-progress trip was updated
  • the driver diverged from the current route
  • the driver selected an alternative route from the UI
  • the driver was offered or required to use a better route
  • the driver started navigating to a destination (via a call to setDestinations)
  • the driver started navigating to a new waypoint after arriving at a previous one
  • the route was cleared (via a call to clearDestinations)
- (void) navigator: (GMSNavigator *)  navigator
didUpdateRemainingTime: (NSTimeInterval)  time 
[optional]

Called when the estimated time(s) to the destination(s) are updated.

Parameters:
timeThe time to the next destination.
- (void) navigator: (GMSNavigator *)  navigator
didUpdateRemainingDistance: (CLLocationDistance)  distance 
[optional]

Called when the estimated distance(s) to the destination(s) are updated.

Parameters:
distanceThe distance to the next destination.
- (void) navigator: (GMSNavigator *)  navigator
didUpdateDelayCategory: (GMSNavigationDelayCategory)  delayCategory 
[optional]

Called when the delay category to the destination(s) are updated.

Parameters:
delayCategoryThe delay category to the next destination.
- (void) navigator: (GMSNavigator *)  navigator
didChangeSuggestedLightingMode: (GMSNavigationLightingMode lightingMode 
[optional]

Called when the estimated lighting conditions are updated, for example when night falls at the devices's current location.

Parameters:
lightingModeThe suggested color mode to match the current lighting conditions.
- (void) navigator: (GMSNavigator *)  navigator
didUpdateSpeedingPercentage: (CGFloat)  percentageAboveLimit 
[optional]

Notifies you that the driver is exceeding the speed limit by the specified percentage.

Parameters:
navigatorGMSNavigator that reports the speeding.
percentageAboveLimitPercentage above the speed limit the driver is currently driving at. Set to 0 when the driver is not speeding. Set to -1 when the speed limit or current speed is invalid.
- (void) navigator: (GMSNavigator *)  navigator
didUpdateSpeedAlertSeverity: (GMSNavigationSpeedAlertSeverity speedAlertSeverity
speedingPercentage: (CGFloat)  percentageAboveLimit 
[optional]

Notifies you that the device has detected that the vehicle is exceeding the speed limit by the specified percentage along with the current speed alert severity.

This is called at regular intervals whenever a valid speed or speed limit update is available. This usually results in frequent calls during active navigation when the driver is moving.

Parameters:
navigatorGMSNavigator that reports the speeding.
speedAlertSeverityThe severity of the current speed alert. Set to GMSNavigationSpeedAlertSeverityUnknown when the speed limit is unknown or the speed is invalid. Set to GMSNavigationSpeedAlertSeverityNotSpeeding when the driver is not speeding according to the thresholds configured in GMSNavigationSpeedAlertOptions. When the driver is speeding this will be set to GMSNavigationSpeedAlertSeverityMinor or GMSNavigationSpeedAlertSeverityMajor according to the configured thresholds.
percentageAboveLimitPercentage above the speed limit the driver is currently driving at. Only valid when speedAlertSeverity is Minor or Major.
- (void) navigator: (GMSNavigator *)  navigator
didUpdateNavInfo: (GMSNavigationNavInfo *)  navInfo 
[optional]

Called when the current GMSNavigationNavInfo is updated.

This is called regularly during active navigation.

Parameters:
navInfoThe updated GMSNavigationNavInfo.