perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.08k stars 350 forks source link

Use Polyline Encode instead of Lat / Lng for Waypoins #487

Closed nyoakaway closed 6 years ago

nyoakaway commented 6 years ago

Hello, is there currently the Router Machine the possibility of instead of passing Latitude and Longitude to the Waypois be using the polyline encode? Because I have situations that the URL is too big and ends up giving error because the browsers have this limit of characters in the URL! I have not found anything in the documentation but in OSMR it accepts the option to be searching with POLYLINE and not with Lat / Lng!

Thanks in advance!

perliedman commented 6 years ago

Hi there, sorry about the late reply.

From your question, it sounds like this is more of an OSRM question, than a question about Leaflet Routing Machine, since the URL format etc. is outside the scope of Leaflet Routing Machine: we just use whatever OSRM decides.

Having said that, I think you should look into OSRM's map matching functionality, since it sounds like you are not actually searching for a route, but rather matching an existing route against the road network. The map matching supports entering a lot more points than the route finder.