Navigation Products
Mapbox provides a full suite of products and services for adding navigation experiences and routing-related data to applications or data projects. These products include front-end navigation libraries and SDKs for web and mobile applications, as well as web services APIs for integration into any environment.
This guide covers common navigation UX patterns and use cases, and provides an overview of the Mapbox products and services that support them. Also included are links to documentation, code examples, and API playgrounds to help you get started with Mapbox navigation products.
Navigation UX Patterns
The following are the most common UX patterns using Mapbox navigation products:
Route Preview
Route preview is a common navigation pattern that shows a user the route they will take on a map before they start navigating. This pattern is often used in driving, walking, and cycling directions, and helps the user understand the route and make any necessary adjustments before starting navigation.
Route Previews are rendered using a response from the Directions API.
Interactive Navigation
Interactive navigation presents a user with a map and turn-by-turn directions as they navigate, making use of a mobile device's live location to guide them to their destination. This pattern is used in driving, walking, and cycling directions, and is often used in conjunction with voice guidance, traffic data, and other features to help users reach their destination.
Interactive Navigation is possible with the Navigation SDKs for iOS and Android, which are both powered by the Directions API.
Other Navigation Use Cases
Mapbox Navigation products and services support a wide range of use cases beyond the most common patterns listed above. Many of these are backend or data pipeline use cases that involve analyzing locations and routing in real-time.
Calculate Travel Time and Distance between Multiple Points
For scenarios such as a fleet of vehicles on the move that may need to visit multiple locations, it is important to calculate the travel time and distance between multiple points at one time. This can help optimize routes, plan for traffic, and make sure that vehicles arrive at their destinations on time.
To calculate travel time and distance between multiple points, use the Matrix API.
Spatial Joins with Time-Distance Isochrones
Spatial joins with time-distance isochrones are used to find all points within a certain travel time or distance of a given point. This can be useful for finding nearby points of interest, planning delivery routes, or analyzing the accessibility of a location.
To retrieve time-distance isochrones, us the Isochrone API.
Route Optimization (The Traveling Salesperson Problem)
Route optimization is used to find the most efficient route that visits a set of locations. This is a common problem in logistics, delivery, and transportation, and can help save time, fuel, and money by optimizing routes for multiple vehicles or deliveries.
To optimize routes, use the Optimization API.
Cleanup of Fuzzy Route Data for Display or Analysis
GPS tracks regularly log a vehicle's location, but these points can be noisy or inaccurate. Map matching cleans up fuzzy route data by snapping GPS points to the road network, making it easier to display the actual route on a map or analyze the traveled road segments and maneuvers.
To clean up fuzzy route data, use the Map Matching API.
Electric Vehicle Charging
Electric vehicle charging is a growing market, and EV drivers need to find charging stations along their route. Drivers not only need to know where the charging stations are, but also need to know which stations are available, what types of connectors they support, and how long it will take to charge their vehicle.
To find EV charging stations, use the EV Charge Finder API.
Frontend Navigation products
Mapbox provides frontend products that allow integration of navigation experiences and data for web and mobile applications. These products include SDKs for iOS and Android, as well as plugins for Mapbox GL JS.
Navigation SDK for iOS
The Mapbox Navigation SDK for iOS is a software development kit (SDK) that provides turn-by-turn navigation for iOS applications. It includes features such as voice guidance, traffic data, and route preview, and can be customized to match the look and feel of your application. It also includes a core library that provides routing and navigation functionality without the UI components.
To get started with the Navigation SDK for iOS, see its documentation.
Learn how to install the Navigation SDK for iOS and add turn-by-turn navigation to an iOS app.
Navigation SDK for Android
The Mapbox Navigation SDK for Android is a software development kit (SDK) that provides turn-by-turn navigation for Android applications. It includes features such as voice guidance, traffic data, and route preview, and can be customized to match the look and feel of your application. It also includes a core library that provides routing and navigation functionality without the UI components.
To get started with the Navigation SDK for Android, see its documentation and code examples.
Learn how to install the Navigation SDK for Android and add turn-by-turn navigation to an Android app.
Add a full-featured navigation experience to an Android app.
Mapbox GL Directions Plugin
Though real-time navigation is less common in web applications, showing route previews on a map along with text-based directions is a common need for store locators and other web app use cases. The Mapbox GL Directions plugin is a library that provides written directions and route preview for web applications that use Mapbox GL JS. It includes features such as route previews, traffic data, and route optimization, and can be customized to match the look and feel of your application. It is integrated with Mapbox Search APIs to allow users to quickly search for an origin and destination, and provides an intuitive interface for searching for an origin and destination and displaying the route on a map.
Add a route preview and text-based directions to a web app using the Mapbox GL Directions plugin.
Frontend Navigation Product Pricing
Pricing for the mobile Navigation SDKs is based on a combination of monthly active users and the number of monthly trips calculated. See the Navigation SDK section of the Mapbox Pricing page for more information
Pricing for Mapbox GL Directions is based on usage of the underlying APIs. See the Navigation API Pricing section below for more information.
Navigation APIs
Directions API
The Directions API provides routing and navigation functionality for web and mobile applications. It allows you to calculate routes between two or more locations, and provides turn-by-turn directions, traffic data, and route optimization. The response includes spatial data for displaying the calculated route on a map. The Directions API is used by the Navigation SDKs for iOS and Android, as well as the Mapbox GL Directions plugin.
It also supports Electric Vehicle (EV) routing, which allows you to calculate routes that are optimized for electric vehicles, taking into account real-time factors such as battery range, charging stations, and charging time.
To get started with the Directions API, see its reference documentation or try its API Playground using one of the links below.
Experiment with request parameters for the Directions API using a graphical interface, and inspect the API response object.
Experiment with request parameters for the Directions API for an Electric Vehicle (EV) using a graphical interface, and inspect the API response object.
Matrix API
The Matrix API allows you to calculate travel times and distances between multiple points in a single request. This can be useful for scenarios such as route optimization, delivery planning, and fleet management.
To get started with the Matrix API, see its reference documentation.
Isochrone API
The Isochrone API allows you to calculate isochrones, which are polygons that represent all points that can be reached within a certain travel time or distance from a given point. This can be useful for scenarios such as spatial joins, accessibility analysis, and delivery planning.
To get started with the Isochrone API, see its reference documentation or try its API Playground:
Experiment with request parameters for the Isochrone API using a graphical interface, and inspect the API response object.
Map Matching API
The Map Matching API allows you to clean up fuzzy route data by snapping GPS points to the road network. This can be useful for scenarios such as GPS trace lookup, route analysis, and route display.
To get started with the Map Matching API, see its reference documentation.
EV Charge Finder API
The EV Charge Finder API allows you to find electric vehicle charging stations near a point or along a route. This can be useful for scenarios such as electric vehicle routing, trip planning, and charging station discovery.
To get started with the EV Charge Finder API, see its reference documentation or try its API Playground:
Experiment with request parameters for the EV Charge finder API using a graphical interface, and inspect the API response object.
Wrapping Libraries
You can use Mapbox Navigation APIs directly, but you can also use one of several wrapper libraries to integrate them into applications across platforms. These libraries provide a more convenient way to interact with the APIs and may include additional features or functionality.
- Mapbox Navigation SDK for iOS - Use the
Navigation Core
module to handle navigation without a UI in an iOS environment. - Mapbox Navigation SDK for Android - Use the
Navigation Core
module to handle navigation without a UI in an Android environment. - Mapbox Java SDK - Use the Java SDK's Services module to interact with the Directions, Matrix, Isochrone, and Map Matching APIs in a Java environment (including Android App development).
Navigation API Pricing
All Mapbox navigation APIs are priced based on usage and include a generous free tier for testing.
For full details, see the Mapbox Pricing page.