Adding directions to leaflet map

How can I add directions to a leaflet map? If possible please could you link me to or provide sample code? This is the example response for the json: https://www.temporary-url.com/E38DB8 .

P.S. Apologies for the ad but this is the fastest temp url shortener I found

Hi @Armaan_Mehta,

There are different ways to do this, but none of them are related to ORS itself.
The directions are stored in the steps property of each route segment.
How you display them (entries in a sidebar, popup on the route) is up to you.
You can check out our client, to look how we do it.

Best regards

Hi,

I’m working on Lealflet Map and a plugin extend the Leaflet Routing Machine plugin.
Take à look at:

The source of map using this plugin is here

HTH

1 Like