Template:Pinpoint

From OpenStreetMap Wiki
Jump to navigation Jump to search

link

[Edit] [Purge] Template-info.svg Template documentation

Summary

Template:Pinpoint is a simple template that generates a hyperlink to the OpenStreetMap website with a marker on a specific coordinate. You can use this instead of node, way and relation references to ensure the user will be directed to a correct location in the map regardless of map elements being moved or deleted in the future.

It would probably be useful for other wikis as well such as WikiTravel, WikiVoyage and Wikipedia.

Parameters

The following parameters can be passed into the template:

Parameter name Required Purpose
lat Yes The latitude of the marker.
long Yes The longitude of the marker.
zoom No The zoom level to open linked to maps at. Default value is 12.

In addition, the first non-named parameter specifies the visible text of the hyperlink.

Examples

Working example

{{Pinpoint
| lat  = 48.85829
| long = 2.29449
| zoom = 19
| name = Eiffel Tower
}}

Eiffel Tower

Non working example

It seems that this template no longer work like that. Please use the param name like in previous example

{{Pinpoint
| lat  =  51.5039137
| long =  -0.1181693
| zoom =  15
| Jubilee Gardens
}}

produces a hyperlink to a pin over the Jubilee Gardens that always works for the user, regardless of map edits.

[https://www.openstreetmap.org/?mlat=51.5039137&mlon=-0.1181693#map=15/51.5039137/-0.1181693 Jubilee Gardens ]