Extending Leaflet Routing Machine to work with Here Maps

585 Views Asked by At

Leaflet Routing Machine provides an easy way to integrate directions capabilities in Leaflet. Out of the box it used to work with MapBox but it is a while since it has been updated and I find thaat it does not quite work anymore. In any case I want to use Leaflet + LRM with my chosen provider - HERE maps. The HERE Maps directions URL bears the form

https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey=<API_KEY>&waypoint0=geo!lat0,lng0

9&waypoint1=geo!lat1,lng1&mode=fastest;car;traffic:disabled

How can I modify Leaflet Routing machine to access and then use the results provided by the Here Directions API?

1

There are 1 best solutions below

2
On

There is a plugin for here's routing API: https://github.com/Daredzik/lrm-Here

Haven't used it myself, but looks good.