Wiki:Maps

From OpenStreetMap Wiki
Jump to navigation Jump to search

Given that OpenStreetMap is about geographic data, it seems logical to include maps in this wiki as well. This article outlines the options using a map sample of Vienna.

Slippy maps

Slippy maps are flexible displays of maps. You can pan around and zoom. This is very helpful in case a reader wants to see the map out of the framed area or needs to find the next bigger city to orient themselves.

The state-of-the-art approach uses the MultiMaps extension. In order to be independent from any extension, it is recommended to use the following template:

{{slippymap
 |lat=   48.2274
 |lon=   16.3835
 |zoom=  15        (12 default)
 |width= 300       (400 default)
 |height=300       (400 default)
 |layer= Leaflet   (Standard tile layer is the default)
}}

Loading map...


Additionally, the extension supports all featured tile layers by setting layer to cycle, transport, oepnv, humanitarian, or cyclosm. The list of layers is defined in https://github.com/openstreetmap/chef/blob/master/cookbooks/wiki/templates/default/mw-ext-MultiMaps.inc.php.erb and it is occasionally updated to match the list of featured tile layers.

Static maps

Static maps are displays of map data which can not be moved by the reader. This might be less distracting for them.

Images

The easiest option is to include images of maps. This can be done by taking a screenshot of the Homepage and uploading it into the wiki.

[[File:Nordwestbahnhof Wien Openstreetmap 170924.jpg|200px]]

Nordwestbahnhof Wien Openstreetmap 170924.jpg

Standard tiles

You can also directly include tiles from the tile servers in the wiki. So you will not need to upload anything and the tile might be updated, but on the other hand, you can not choose the exact area to display.

https://tile.openstreetmap.org/15/17875/11359.png

11359.png

Linking to maps

Linking to the standard map is preferable over displaying maps when often used on a page as it avoids long loading times and breaking text blocks.

{{Map|latitude|longitude|zoom level|link text}}

Link to a map of Vienna

Similar templates are available from Category Templates for Maps.