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

How can I integrate the OpenStreetMap directions on my web page, Is there an API?

0

I want to use all the directions page for routing, distance and time. Is there some API so I can make the connection with my web page?

asked 12 Sep '23, 21:19

AdrianGtz's gravatar image

AdrianGtz
11112
accept rate: 0%


One Answer:

1

OpenStreetMap itself does not have, to the best of my knowledge, a routing server. It seems to rely on other projects (OSRM, GraphHopper, etc.). Those projects may have an API and you may want to check on their websites to see what they have to offer.

If you don’t need things tightly coupled and/or using your own visual look and feel, then you can do some stuff without a API.

For example, a screen capture of your business location put into a web page with the image being a link to that view on OSM's main page. Or a link for directions that goes to a routing project's page with the to and from fields already filled out.

answered 12 Sep '23, 23:54

n76's gravatar image

n76
10.8k1082172
accept rate: 17%

Source code available on GitHub .