Template:Coord how-to: Difference between revisions
>Rusty.perrin (Fix wikipedia links) |
(Created page with "<div class="{{{class|}}}" style="display:table; background:#f5fffa; color: #222; margin: 1em 0; border: 1px solid #a2a9b1;{{{style|}}}"> <div style="background:#cef2e0; font-weight:bold; border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> {{{{{navbar|navbar-header}}}|1= {{{title|Quick how-to}}} |2=Coord_how-to}} </div><!--end header --> <div style="border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> To add {{Coord|57|18|22|N|4|27|32|W}} to the top of an artic...") |
||
Line 1: | Line 1: | ||
<div class="{{{class|}}}" style="display:table; background:#f5fffa; color: #222; margin: 1em 0; border: 1px solid #a2a9b1;{{{style|}}}"> | |||
<div style="background:#cef2e0; font-weight:bold; border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> | |||
{{{{{navbar|navbar-header}}}|1= {{{title|Quick how-to}}} |2=Coord_how-to}} | |||
</div><!--end header --> | |||
<div style="border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> | |||
:'''<code><nowiki>{{Coord|57|18|22 | To add {{Coord|57|18|22|N|4|27|32|W}} to the top of an article, use {{Tl|Coord}}, thus: | ||
These | :'''<code><nowiki>{{Coord|57|18|22|N|4|27|32|W|display=title}}</nowiki></code>''' | ||
These [[Geographic coordinate system|coordinates]] are in [[Degree (angle)|degrees]], [[Minute and second of arc|minutes, and seconds of arc]]. | |||
:'''<code><nowiki>{{Coord|44. | "title" means that the coordinates will be displayed next to the article's title at the top of the page (in desktop view only; title coordinates do not display in mobile view) and before any other text or images. It also records the coordinates as the primary location of the page's subject in Wikipedia's geosearch API. | ||
''or'' | </div><!-- end of section 1 --> | ||
:'''<code><nowiki>{{Coord|44. | <div style="border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> | ||
These coordinates are in [[ | To add {{Coord|44.1124|N|87.9130|W}} to the top of an article, use either | ||
:'''<code><nowiki>{{Coord|44.1124|N|87.9130|W|display=title}}</nowiki></code>''' | |||
(which does not require minutes or seconds but does require the user to specify north/ south and east/west) ''or'' | |||
* Degrees, minutes and seconds must be separated by a pipe ("|"). | :'''<code><nowiki>{{Coord|44.1124|-87.9130|display=title}}</nowiki></code>''' | ||
* | (in which the north and east are presumed by positive values while the south and west are negative ones). | ||
* Avoid | These coordinates are in [[decimal degrees]]. | ||
</div><!-- end of section 2 --> | |||
<div style="border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> | |||
* Degrees, minutes and seconds, when used, must each be separated by a [[Vertical bar|pipe ("|")]]. | |||
* [[Geodetic datum|Map datum]] must be [[WGS84]] if possible (except for off-Earth bodies). | |||
* Avoid [[Wikipedia:WikiProject Geographical coordinates#Precision guidelines|excessive precision]] (0.0001° is <11 m, 1″ is <31 m). | |||
* Maintain [[MOS:UNCERTAINTY|consistency]] of decimal places or minutes/seconds between latitude and longitude. | |||
* Latitude (N/S) must appear before longitude (E/W). | * Latitude (N/S) must appear before longitude (E/W). | ||
</div><!-- end of section 3 --> | |||
<div style="border-bottom: 1px solid #a2a9b1; padding: 0.2em 0.4em;"> | |||
*[[Template:Coord#dim:D|dim]]: <code>dim:</code>'''''N''''' (viewing | Optional coordinate parameters follow the longitude and are separated by [[Underscore|an underscore ("_")]]:<br /> | ||
*[[Template:Coord#dim:D|dim]]: <code>dim:</code>'''''N''''' (viewing <u>d</u>iameter <u>i</u>n <u>m</u>etres) | |||
*[[Template:Coord#region:R|region]]: <code>region:</code>'''''R''''' ([[ISO 3166-1 alpha-2]] or [[ISO 3166-2]] code) | *[[Template:Coord#region:R|region]]: <code>region:</code>'''''R''''' ([[ISO 3166-1 alpha-2]] or [[ISO 3166-2]] code) | ||
*[[Template:Coord#type:T|type]]: <code>type:</code>'''''T''''' (<code>landmark</code> or <code>city(30,000)</code>, for example) | *[[Template:Coord#type:T|type]]: <code>type:</code>'''''T''''' (<code>landmark</code> or <code>city(30,000)</code>, for example) | ||
Line 27: | Line 34: | ||
*[[Template:Coord#Display|display]] | *[[Template:Coord#Display|display]] | ||
*: {{Para|display|inline}} (the default) to display in the body of the article only, | *: {{Para|display|inline}} (the default) to display in the body of the article only, | ||
*: {{Para|display|title}} to display in | *: {{Para|display|title}} to display at the top of the article only (in desktop view only; title coordinates do not display in mobile view), or | ||
*: {{Para|display|inline,title}} to display in both places. | *: {{Para|display|inline,title}} to display in both places. | ||
*[[Template:Coord#Name|name]] | *[[Template:Coord#Name|name]] | ||
*: <code>name=</code>'''''X''''' to label the place on maps (default is | *: <code>name=</code>'''''X''''' to label the place on maps (default is [[mw:Help:Magic words#Page names|PAGENAME]]) | ||
Thus: '''<code><nowiki>{{Coord|44. | Thus: '''<code><nowiki>{{Coord|44.1172|-87.9135|dim:30_region:US-WI_type:event</nowiki></code>''' | ||
::'''<code><nowiki>|display=inline,title|name=accident site}}</nowiki></code>''' | ::'''<code><nowiki>|display=inline,title|name=accident site}}</nowiki></code>''' | ||
Use {{Para|display|title}} (or {{Para|display|inline,title}}) once per article, for the subject of the article, where appropriate. | Use {{Para|display|title}} (or {{Para|display|inline,title}}) once per article, for the subject of the article, where appropriate. | ||
</div><!-- end of section 4 --> | |||
<div style="padding: 0.2em 0.4em;"> | |||
* Per | * Per [[WP:ORDER]], the template is placed at the bottom of the article in the 'end matter', after any [[Wikipedia:Navigation template|navigation templates]], but before all [[Wikipedia:Categorization|categories]], including the {{tl|DEFAULTSORT}} template. This template may also be placed within an [[Help:Infobox|infobox]], instead of at the bottom of the article. | ||
* For full | * For full details, refer to {{tl|Coord/doc}}. | ||
* Additional guidance is available | * Additional guidance is available at [[Wikipedia:Obtaining geographic coordinates|obtaining coordinates]] and [[Geographic coordinate conversion|converting coordinates]]. | ||
</div><!-- end of section 5 --> | |||
{{documentation}} | </div><noinclude> | ||
{{documentation|content= | |||
==Usage == | |||
This a sub-tempate for {{tl|Coord/doc}}. | |||
[[Category:WikiProject Geographical coordinates]] | [[Category:WikiProject Geographical coordinates]] | ||
</noinclude> | }}</noinclude> |
Revision as of 21:49, 6 September 2024
to the top of an article, use {{Coord}}, thus:
{{Coord|57|18|22|N|4|27|32|W|display=title}}
These coordinates are in degrees, minutes, and seconds of arc.
"title" means that the coordinates will be displayed next to the article's title at the top of the page (in desktop view only; title coordinates do not display in mobile view) and before any other text or images. It also records the coordinates as the primary location of the page's subject in Wikipedia's geosearch API.
to the top of an article, use either
{{Coord|44.1124|N|87.9130|W|display=title}}
(which does not require minutes or seconds but does require the user to specify north/ south and east/west) or
{{Coord|44.1124|-87.9130|display=title}}
(in which the north and east are presumed by positive values while the south and west are negative ones). These coordinates are in decimal degrees.
- Degrees, minutes and seconds, when used, must each be separated by a pipe ("|").
- Map datum must be WGS84 if possible (except for off-Earth bodies).
- Avoid excessive precision (0.0001° is <11 m, 1″ is <31 m).
- Maintain consistency of decimal places or minutes/seconds between latitude and longitude.
- Latitude (N/S) must appear before longitude (E/W).
Optional coordinate parameters follow the longitude and are separated by an underscore ("_"):
- dim:
dim:
N (viewing diameter in metres) - region:
region:
R (ISO 3166-1 alpha-2 or ISO 3166-2 code) - type:
type:
T (landmark
orcity(30,000)
, for example)
Other optional parameters are separated by a pipe ("|"):
- display
|display=inline
(the default) to display in the body of the article only,|display=title
to display at the top of the article only (in desktop view only; title coordinates do not display in mobile view), or|display=inline,title
to display in both places.
- name
name=
X to label the place on maps (default is PAGENAME)
Thus: {{Coord|44.1172|-87.9135|dim:30_region:US-WI_type:event
|display=inline,title|name=accident site}}
Use |display=title
(or |display=inline,title
) once per article, for the subject of the article, where appropriate.
- Per WP:ORDER, the template is placed at the bottom of the article in the 'end matter', after any navigation templates, but before all categories, including the {{DEFAULTSORT}} template. This template may also be placed within an infobox, instead of at the bottom of the article.
- For full details, refer to {{Coord/doc}}.
- Additional guidance is available at obtaining coordinates and converting coordinates.