This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

routing on websites

0

I am new to osm. is it possible to embedd it on my web to create a routing facility that will provide directions?

asked 10 Nov '15, 09:02

triumph%20tatenda's gravatar image

triumph tatenda
11112
accept rate: 0%

edited 10 Nov '15, 19:17

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

very much related: is-there-an-osm-routing-api

(10 Nov '15, 19:19) aseerel4c26 ♦

One Answer:

4

The OSMF doesn't provide a central routing service, the services available on openstreetmap.org are accessed via some JS code to access the various routing services which tend to have their own APIs.

See

https://github.com/openstreetmap/openstreetmap-website/tree/master/app/assets/javascripts/index/directions

and

https://wiki.openstreetmap.org/wiki/List_of_OSM-based_services#Routing

answered 10 Nov '15, 09:16

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 10 Nov '15, 09:18

... or to give a precise hint:

try http://www.liedman.net/leaflet-routing-machine/ ... that is a plugin for the http://leafletjs.com/ javascript library.

(10 Nov '15, 17:29) stephan75

Source code available on GitHub .