Asking to OSRM for a route, OSRM is returning the geometry:
"route_geometry":"ity_rArqlxIvTv|AoCrY"
After decode them, I'm getting 3 GPS coordinates:
43.529557, -5.659434
43.529208999999994, -5.660934
43.529281, -5.66136
But with just 3 points, I'm getting this route 🙁
How can I draw a right route on the road with openlayers? Like this:
Best Answer
The route geometry you get is a encoded polyline. You can create a route from it as follows:
Source : http://jsfiddle.net/jonataswalker/079xha47/