Template:Place/doc

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Place
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · भोजपुरी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ‎ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

Summary

Template:Place is a template to place details of a place on to the wiki page with the language set by the parameter "lang" or in the language of the current page returned by {{Langcode}} (this language code is determined by the namespace for DE,ES,FR,IT,JA,NL,RU or by the pagename prefix otherwise). Autotranslation is supported but there are still specialized versions of this template.

The template places a text description in the page itself, and a box on the right with links to further details on the place. There are options for a slippy map centred on the left, and a static image in the box on the right.

The template puts the article in the correct categories: [[Category:Types in subarea]] and/or [[Category:Types in area]] and [[Category:name]] (if the category name exists) so there is no need to do that manually.

One does need to manually put the categories like [[Category:Types in subarea]] into categories like [[Category:Types in area|subarea]] and also into [[Category:subarea]], as well as placing [[Category:name]] into [[Category:Types in subarea]] and/or [[Category:Types in area]].

Parameters

The following parameters can be used in the template:

parameter
name
required purpose
lang No The two character language code for the results to be returned. Default is "en". Not yet implemented.
name Yes The name of the place being referred to (eg. Nottingham). This name is used to lookup category names (it may contain a disambiguating precision).
fullname No An alternate full name to display on the page (adding an article, or removing the disambiguating precision). If not set, the name parameter will be used.
type Yes The type of place. Recognised values are: village/ city/ ville/ town/ suburb/ hamlet/ hameau/ municipality /metropolitan borough and town/ county/ district/ canton/ kreis/ landkreis/ département/ province/ prefecture/ oblast/ région/ region/ state/ country/ pays/ sovereign state/ continent/ island/ isle.
subarea No A subarea of the area (for example a province of China). It is possible to not define the subarea and just use area instead.
area Yes The area the place is in (eg. China)
lat Yes The latitude of the place.
long Yes The longitude of the place.
zoom No The zoom level to open linked to maps at. Default value is 12.
image No The title of the image to display. No image will be display if image is not defined
map No "Yes" if you would like a slippymap included in the main page (width and height can also be used). No map will be displayed if field left blank.
latlon No "Yes" if you would like to add link to LatLon.org public transport render.
sortkey No The sortkey for categories. If sortkey is not supplied the name of the place will be used as the sortkey.
list No URL of a mailing list for the place. If left blank, no link will appear.
archive No URL of an archive page for the place. If left blank, no link will appear.
forum No URL of a forum page for the place. If left blank, no link will appear.
wikipedia No deprecated - use en.wikipedia instead.
en.wikipedia No The article name on en.wikipedia.org. Default value is name
de.wikipedia No The article name on de.wikipedia.org
es.wikipedia No The article name on es.wikipedia.org
fr.wikipedia No The article name on fr.wikipedia.org
it.wikipedia No The article name on it.wikipedia.org
ja.wikipedia No The article name on ja.wikipedia.org
nl.wikipedia No The article name on nl.wikipedia.org
pt.wikipedia No The article name on pt.wikipedia.org
ru.wikipedia No The article name on ru.wikipedia.org
uk.wikipedia No The article name on uk.wikipedia.org
wikidata No The item id (Qnnn) on wikidata.org
osmose No Adding a link to osmose.openstreetmap.fr (may be enabled everywhere, Osmose has worldwide coverage)
BestOfOSM No Inscription in BestOfOSM.org possibles values are : BestOf/ Interesting/ Import/ Historic, categorize the page in the relevant category
krdb No The database to use in the Keep Right link. Default value is EU. See Template:Keepright for details.

Categories

If there is a category for the name of the place (e.g. New York) then this category is added to the page.

The template will add the place to a category types in subarea (e.g. Cities in Berkshire).

If the subarea is not defined, the template will also add the place to the category types in area (eg. Cities in UK). This increases the chance the place will be allocated to a category that exists, but ensures that if a more specific category exists it isn't allocated to the parent category.

Usage

Full template

{{Template:Place
|lang        =xx          (two character language code, default is from {{Langcode}})
|name        =name
|type        =something   (village/city/ville/town/suburb/hamlet/hameau...
                           municipality/metropolitan borough and town...
                           county/district/canton/kreis/landkreis/département...
                           province/prefecture/oblast/région/region/state...
                           country/pays/sovereign state...
                           continent/island/isle)
|subarea     =text        (optional, usually province, prefecture or state name)
|area        =text        (usually country name)
|lat         =number, +/- (latitude of the place)
|long        =number, +/- (longitude of the place)
|zoom        =number 1-17 (optional, The zoom level to open linked 
                           to maps at. Default value is 12. )
|image       =image.png   (optional, image in box)
|map         =Yes         (optional, slippymap included in the main page)
|width       =# of pixels (optional, width of slippymap, default is 400)
|height      =# of pixels (optional, width of slippymap, default is 400)
|layer       =layer       (optional, layer of slippymap, default is mapnik)
|latlon      =Yes         (optional, to add link to LatLon.org 
                           public transport render.)
|sortkey     =text        (optional, If sortkey is not supplied the 
                           name of the place will be used as the sortkey.)
|list        =URL         (optional, mailing list page for the place.)
|archive     =URL         (optional, archive page for the place)
|forum       =URL         (optional, forum page for the place)
|en.wikipedia=text        (optional, article name on en.wikipedia.org, 
                           default value is 'name')
|de.wikipedia=text        (optional, article name on de.wikipedia.org)
|es.wikipedia=text        (optional, article name on es.wikipedia.org)
|fr.wikipedia=text        (optional, article name on fr.wikipedia.org)
|it.wikipedia=text        (optional, article name on it.wikipedia.org)
|ja.wikipedia=text        (optional, article name on ja.wikipedia.org)
|nl.wikipedia=text        (optional, article name on nl.wikipedia.org)
|pt.wikipedia=text        (optional, article name on ja.wikipedia.org)
|ru.wikipedia=text        (optional, article name on ru.wikipedia.org)
|uk.wikipedia=text        (optional, article name on uk.wikipedia.org)
|wikidata    =Qnnn        (optional, element id on wikidata.org)
|osmose      =Yes         (optional, to add link to osmose.openstreetmap.fr)
|BestOfOSM   =text        (optional, possibles values are: 
                           BestOf/ Interesting/ Import/ Historic)
|krdb        =text        (optional, database to use in the 'Keep Right' link. Default
                           value is EU. See [[Template:Keepright]] for details.)
}}

Blank template with required fields only

{{Place
|name = 
|type = 
|area = 
|lat  = 
|long = 
}}

Blank template with all available fields

{{Place
|lang        = en
|name        = 
|type        = 
|subarea     = 
|area        = 
|lat         = 
|long        = 
|zoom        = 12
|image       = 
|map         = 
|width       = 
|height      = 
|layer       = 
|latlon      = 
|sortkey     = 
|list        = 
|archive     = 
|forum       = 
|de.wikipedia= 
|en.wikipedia= 
|es.wikipedia= 
|fr.wikipedia= 
|it.wikipedia= 
|ja.wikipedia= 
|ru.wikipedia= 
|uk.wikipedia= 
|wikidata    = 
|osmose      = 
|BestOfOSM   = 
|krdb        = 
}}

Example - UK town (no slippy map displayed, static image used instead)

Reading, Berkshire
latitude: 51.445, longitude: -0.9685
Browse map of Reading 51°26′42″ N, 0°58′07″ W
Edit map
Reading}
External links:
Use this template for your city

Reading is a town in Berkshire at latitude 51°26′42″ North, longitude 0°58′07″ West.

{{Place
|lang        = en
|name        = Reading
|type        = town
|area        = Berkshire
|lat         = 51.445
|long        = -0.9685
|zoom        = 11
|image       = File:UK Reading status.png
}}

Example - US city (no static image, but using a slippy map below the description)

Los Angeles, California, United States
latitude: 34.05, longitude: -118.25
Browse map of Los Angeles 34°03′00″ N, 118°15′00″ W
Edit map
External links:
Use this template for your city

Los Angeles is a city in California, United States at latitude 34°03′00″ North, longitude 118°15′00″ West.

OpenStreetMap images (and underlying map data) are freely available under the OpenStreetMap License.
{{Place
|lang        = en
|name        = Los Angeles
|type        = city
|subarea     = California
|area        = United States
|lat         = 34.05
|long        = -118.25
|zoom        = 11
|map         = yes
}}