Skip to content

Directions

The Directions element displays route navigation between two addresses. It geocodes origin and destination, calculates a route via OSRM, and shows turn-by-turn steps with distance and duration.


Features

  • Route calculation via OSRM (Open Source Routing Machine)
  • Geocoding via Nominatim (free) or Google/HERE/Mapbox
  • Travel modes — driving, walking, cycling, transit
  • Turn-by-turn steps with scrollable instruction list
  • Editable origin/destination or preset addresses
  • Use current location as starting point via browser geolocation
  • Map preview centered on route midpoint

Settings

SettingDescriptionDefault
Map ProviderGeocoding and map tile provider (OSM, Google, HERE, Mapbox)OSM (Free)
OriginStarting address
DestinationEnding address
Travel Modedriving, walking, cycling, or transitdriving
Route ColorColor of route indicators#4285F4
Map HeightHeight of the map area in pixels350
Show StepsDisplay turn-by-turn directionstrue
Editable OriginAllow users to type a starting addressfalse
Editable DestinationAllow users to type a destinationfalse
Show AlternativesShow alternate routes (when available)false
Use Current LocationAuto-detect user's location as originfalse

How It Works

  1. If both origin and destination are preset, the route is calculated automatically on load
  2. If editable, users type addresses and click Go to calculate
  3. The element geocodes both addresses using Nominatim
  4. OSRM calculates the optimal route and returns steps
  5. The map iframe shows the route area; duration and distance are displayed below
  6. Turn-by-turn steps appear in a scrollable list

Use Cases

  • Delivery tracking with route preview
  • Store directions from user's current location
  • Event venue navigation
  • Service area route planning

Styling

The Directions element supports standard Container color and dimension settings:

  • Background color, border, padding, margin
  • Border radius and width

Questions?

If you have any questions, please don't hesitate to contact us. Alternatively, you can submit an issue on this platform.

Was this article helpful?

No-Code App Builder