Skip to main content

Route alerts

Route alerts are notifications about upcoming events or points of interest along the selected route. Unlike visual and spoken instructions, which are necessary to guide the user along the route, route alerts are strictly informational. If you choose to use route alerts as part of a guided navigation session, you are in control of when and how to display or announce these alerts to the user.

Route alert

In Mapbox Navigation SDK for iOS route alert is exposed as RouteAlert struct and contains information about:

  • RoadObject, which describes upcoming route alert (which in turn contains RoadObject.Kind, which describes kind of the road object)
  • distance from the current position to the alert, in meters

Get notified about route alerts

Listen for routeControllerProgressDidChange notifications or implement the corresponding delegate method, NavigationServiceDelegate.navigationService(_:didUpdate:with:rawLocation:) to be notified when the route progress object changes, which in turn contains route alerts related information in RouteProgress.upcomingRouteAlerts.

Route alerts

Route alert types are defined in RoadObject.Kind. Some available types of route alerts include:

  • Incidents on a route
  • Toll booths and electronic gates
  • Country border crossings
  • Tunnels
  • Rest stops
  • Restricted areas
  • Bridges

Further resources

Was this page helpful?