Template talk:City

From OpenStreetMap Wiki
Jump to: navigation, search


What is this?

If you read this, you have probably clicked on the word "what?" in a phrase such as Brussels (50.85,4.35, OSM map, g, mq, mm, wll, what?).

That phrase is created by the template:city when the wikitext of a page says {{city | NAME=Brussels | LAT=50.85 | LONG=4.35 }}, making reference to a city with the given name and coordinates.


  • The name of the city becomes a link to the Wikipedia article, and is used to form an hCard microformat.
  • First in the parenthesis is the latitude and longitude. These are expressed in decimal degrees (not degrees and minutes) with north and east being positive, while west and south are negative. They are also output as a Geo microformat.
  • OSM map is a link to the OSM (openstreetmap.org) map of the specified coordinates.
  • g is a link to the Google Maps in hybrid mode, showing both satellite image and (where available) map details.
  • mq is a link to MapQuest's map of the given location.
  • mm is a link to MultiMap's map of the given location.
  • wll is a link to Windows Live Local in hybrid mode for the given location.

The maps are displayed in a scale of approximately 1:100000, or spanning 10 km from side to side (assuming that the map is 10 cm wide on your screen), which is useful for most cities.

How to use the city template

In your user page on this wiki, write something like "I live in {{city | NAME=Linköping | LAT=58.407 | LONG=15.598 }}". If you live in a place whose name contains spaces (e.g. "Tel Aviv") or if the title of the Wikipedia article does (e.g. "Moss, Norway"), put an underscore where the spaces are, e.g. "{{city | NAME=Tel_Aviv | LAT=32.06 | LONG=34.78 }}".

See also