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

Calculate route or different route

0

Hello everybody, i have some problem with openstreetmap; first of all i don't understand how to add a map in a html code, the only thing i do is to "copy" a piece of map in my code, but if i zoom on the map the other piece of the map do not appear...

The other problem that i have is that: There is an implementation code to calculate a parcour in the openstreet map?

Sorry for the mistake, i am italian. Thank you!

asked 20 Dec '13, 22:16

Zoifil's gravatar image

Zoifil
418811
accept rate: 0%

\1. Please try to keep different questions separated (next time). 2. You can ask in Italian - but it can take longer for an answer.

(21 Dec '13, 01:04) aseerel4c26 ♦

One Answer:

2

At https://www.openstreetmap.org/ there is an icon on the right, second from the bottom, that is for sharing. If you click that a panel will open with a number of sharing options. If you click "html" you will get some code for including a scrollable map in a web page. On example of the use of this is at http://www.nordicbase.org/information

WIth respect to routing, I don't think that OpenStreetMap supports a routing engine, but there are several routing engines that use OSM data and most have a demonstration site. See https://wiki.openstreetmap.org/wiki/Routing

I happen to use http://map.project-osrm.org/ which has a method of constructing a URL that contains the destination and origin.

answered 21 Dec '13, 00:16

n76's gravatar image

n76
10.8k1082172
accept rate: 17%

Source code available on GitHub .