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 embed a specific location OR link a static image to a specific location on OSM?

1

I would like to place a map of a specific place (state park) on a web page about that park. Embedded map would be best; screenshot would suffice. When users click the map, I want them to go to that specific location on OSM.

asked 01 Dec '12, 22:46

Hilltromper's gravatar image

Hilltromper
26112
accept rate: 0%


2 Answers:

4

Browse to the park on the openstreetmap website. Then click on the export tab at the top.

Select either "Embeddable HTML" for an embedded map or select "Map Image (shows standard layer)" for a static image.

You can make a static image clickable by putting code like the following in your webpage.

<a href="https://www.openstreetmap.org/?lat=52.08825&lon=5.14009&zoom=17&layers=M">
  <img src="Wilhelminapark.png" />
</a>

You can get the value for "href" by clicking on the "permalink" at the bottom right of the map when looking at the park on the openstreetmap website.

answered 02 Dec '12, 00:59

cartinus's gravatar image

cartinus
7.0k1066105
accept rate: 27%

1

Have a look at the OSM wiki about Static_map_images to find some solutions.

answered 03 Dec '12, 16:58

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Source code available on GitHub .