Could someone give me example how to create a route between two points using ol3 and osrm and give me the instructions (ex in 500m right etc).

I found this already of documenation: https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#general-options

closed as off-topic by PolyGeo Jun 2 '18 at 8:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.


If OpenLayers is not a hard requirement there is https://github.com/perliedman/leaflet-routing-machine for Leaflet which support OSRM by default.

Looking at the current OpenLayers plugins there seems to be none that supports the OSRM 5.x HTTP API. Which means you will need to write this yourself.

  • I would have a look at leaflet but i prefer to work with openlayers – niels Jun 14 '16 at 9:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.