Mapbox: Directions

Turn-by-turn traffic-aware directions and ETAs, including driving, walking, and cycling

Mapbox's Directions provides a variety of traffic-aware navigation features, including walking, driving, and cycling directions, ETAs, alternative routes, and turn-by-turn instructions, all laid upon Mapbox's beautiful selection of vector maps.

The Mapbox Directions block, you can build traffic-aware directions and navigation into your real-time applications. For example, if you're building a taxi or ridesharing application, the block lets you stream geolocation coordinates data between users (like a driver and passenger), then provide navigation to connect them. Or for a delivery app, you can send drop off locations to a fleet of trucks based on their current coordinates.


The block requires five inputs: two pairs of latitude, longitude and the type of desired transportation method. Once the response comes from Mapbox, the block appends the directions into the message payload.


Input Channel: mapbox-directions-channel (configurable)lat1lng1 is the origin coordinateslat2lng2 is the destination coordinatesprofile represents the type of transporation: mapbox/driving, mapbox/cycling or mapbox/walking



The block appends the directions returned by the Mapbox Directions API into the message payload. Please refer to the Mapbox documentation for field information.


Talk to an expert