When this template is used withdisplay=title, the template is not displayed on mobile. Templates using the classesclass=navbox ({{navbox}}) orclass=nomobile ({{sidebar}}) are not displayed in article space on themobile web site of English Wikipedia. Mobile page views account for approximately 68% of all page views (90-day average as of September 2024[update]). Briefly, these templates are not included in articles because 1) they are not well designed for mobile, and 2) they significantly increase page sizes—bad for mobile downloads—in a way that is not useful for the mobile use case. You can review/watchphab:T124168 for further discussion.This template is still displayed on mobile when used withdisplay=inline, e.g. in infoboxes.
"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.
Use|display=title (or|display=inline,title) once per article, for the subject of the article, where appropriate.
PerWP:ORDER, the template is placed at the bottom of the article in the 'end matter', after anynavigation templates, but before allcategories, including the{{DEFAULTSORT}} template. The{{coord}} template may also be placed within aninfobox, instead of at the bottom of the article.
{{Coord}} provides a standard notation for encoding locations by theirlatitude andlongitude coordinates. It is primarily for specifying theWGS84 geographic coordinates of locations onEarth, at the same time emitting a machine-readableGeo microformat. However, it can also encode locations on natural satellites, dwarf planets, and planets other than Earth.
To specify celestial coordinates, use{{Sky}} instead.
Tag articles which lack coordinates (but need them) with{{Coord missing}}.
If the subject's location is truly unknown or disputed, note this with{{Coord unknown}}.
Latitude and longitude may be specified (with appropriate precision) either in decimal notation or as degrees/minutes/seconds. By default, coordinates appear in the format used to specify them. However, theformat= parameter can be used to force display in a particular format. The template also accepts and displays coordinates formatted as degrees and decimal minutes as found on charts and maritime references.
The template displays the formatted coordinates with ahyperlink toGeoHack. GeoHack displays information customized to the location, including links to external mapping services.
For terrestrial locations, a blue globe () appears to the left of the hyperlink. Clicking on the globe activates theWikiMiniAtlas (requiresJavaScript).
By default, coordinates appear "in line" with the adjacent text. However, thedisplay= parameter can be used to move the coordinates up near the page title (in desktop view only; title coordinates do not display in mobile view)—or display them in both places at once.
The template outputs coordinates in three formats:
Degree/minutes/seconds ("DMS", precision is degrees, or degrees/minutes, or degrees/minutes/seconds, based on input precision).
Decimal degrees (varying the number of decimal places based on input precision)
Logged-in users cancustomize how coordinates appear in their browsers.
You can get coordinates from Wikidata by transcluding this template without any numbered arguments.
You can extract information from the Coord template for use in mathematical expressions. For details, seeModule:Coordinates.
All coordinates used in a page through this template are registered in thegeosearch API. If a coordinate is using title display, then these coordinates will be marked as the primary coordinates with regards to the page and therefore the topic of that page.
Caveats
The templatemust not be modified without prior discussion. External tools can depend on the format of both the wikitext and/or the generated html.
Pages with many inline coordinates may come close to or exceed Wikipedia'sPost-expand include size limit. In these cases, consider using {{#invoke:Coordinates|coord}} instead:
The hemisphere identifiers (N/S) and (E/W), if used, must be adjacent to the enclosing pipe "|" characters, and cannot be preceded or succeeded by spaces.
There are two kinds of parameters, all optional:
Coordinate parameters are parameters that{{Coord}} passes to the map server. These have the formatparameter:value and are separated from each other by the underscore character ( _ ). The supported coordinate parameters aredim:,globe:,region:,scale:,source:, andtype:. Seecoordinate parameters for details and examples.
Template parameters are parameters used by the{{Coord}} template. These have formatparameter=value and are separated from each other by the pipe character ( | ). The supported template parameters aredisplay=,format=,name=, andnotes=.
display= can be one of the following:
display=inline – Display the coordinate inline (default)
display=title – Display the coordinate at the top of the article, beside the article's title (replaces{{coor title dms}} family; coordinates are displayed in desktop view only; title coordinates do not display in mobile view)
shortcut:display=t
display=inline,title – Display the coordinate both inline and beside the article's title (replaces{{coor at dms}} family)
shortcut:display=it
display=title,inline has the same effect asdisplay=inline,title
Note: thetitle attribute indicates that the coordinates apply to the entire article, and not just one of (perhaps many) places mentioned in it—so it should only be omitted in the latter case. Additionally the title option will mark the coordinates as the primary coordinates for the page (and topic of the page) in thegeosearch API.
format= can be used to forcedec ordms coordinate display.
format=dec reformats the coordinates todecimal degrees format.
format=dms reformats the coordinates todegrees | minutes | seconds format.
name= can be used to annotate inline coordinates for display in map services such as theWikiMiniAtlas. If omitted, the article's title (PAGENAME) is assumed.
Note: aname= parameter causes{{Coord}} to emit anhCardmicroformat using that name,even if used within an existing hCard. Do not use when the name is that of a person (e.g for a gravesite), as the generated hCard would be invalid. Also, do not use square brackets in names.
notes= specifies text to be displayed immediately following the coordinates. This is primarily intended for adding footnotes to coordinates displayed beside the title.
qid= specify Q item to display the coordinates of. Used primarily by Wikidata powered infoboxes.
Helper functions
Helper functions are available to manipulate the output from{{Coord}} when it appears in a container template such as an infobox.
Note: this method removes the microformat markup, and should not be used inside templates which emit parent microformats, such as infoboxes or table-row templates.
Displaying all coordinate links on one map
The templates{{GeoGroup}} and{{Maplink}} can be used in an article with coordinates.{{GeoGroup}} creates links to a mapping service, which will display all the coordinates on a single map, and to other services which allow the coordinates to be used or downloaded asKML orGPX format.{{Maplink}} adds either a link or an embedded mapframe, which can display all named coordinates from a page or section ({{coord}} templates using the|name= parameter).
Examples
For the guideline on coordinate precision, seeWP:OPCOORD.
The first unnamed parameter following the longitude is an optional string of coordinate parameters, separated by underscores. These parameters helpGeoHack select suitable map resources, and they will become more important whenWikimaps becomes fully functional.
type:T
Thetype: parameter specifies the type of location for reverse mapping (for instance, to select a marker icon in theWikiMiniAtlas).
Administrative unit of country, 3rd level, seetable
1:100,000
airport
airports and airbases
1:30,000
city(pop)
cities, towns, villages, hamlets, suburbs, subdivisions, neighborhoods, and other human settlements (including unincorporated and/or abandoned ones) with known population Please replacepop with a number. Commas inpop will be ignored. There should be no blanks.
1:30,000 ... 1:300,000
city
cities, towns, villages, hamlets, suburbs, subdivisions, neighborhoods, and other human settlements (including unincorporated and/or abandoned ones) with unspecified population These are treated as minor cities.
1:100,000
country
(e.g. "type:country")
1:10,000,000
edu
schools, colleges, and universities
1:10,000
event
one-time or regular events and incidents that occurred at a specific location, including battles, earthquakes, festivals, and shipwrecks
1:50,000
forest
forests and woodlands
1:50,000
glacier
glaciers and icecaps
1:50,000
isle
islands and isles
1:100,000
landmark
buildings (including churches, factories, museums, theatres, and power plants but excluding schools and railway stations), caves, cemeteries, cultural landmarks, geologic faults, headlands, intersections, mines, ranches, roads, structures (including antennas, bridges, castles, dams, lighthouses, monuments, and stadiums), tourist attractions, valleys, and other points of interest
1:10,000
mountain
peaks, mountain ranges, hills, submerged reefs, and seamounts
1:100,000
pass
mountain passes
1:10,000
railwaystation
stations, stops, and maintenance areas of railways and trains, including railroad, metro, rapid transit, underground, subway, elevated railway, etc.
1:10,000
river
rivers, canals, creeks, brooks, and streams, including intermittent ones
Thescale: parameter specifies the desiredmap scale as 1:N, overriding the scale implied by anytype: parameter.
GeoHack usesscale: to select a map scale for a 72dpi computer monitor. If nodim:,type:, orscale: parameters are provided, GeoHack uses its default scale of 1:300,000.
Thedim: parameter defines thediameter of a viewing circle centered on the coordinate. While the default unit of measurement is metres, thekm suffix may be appended to indicate kilometres.
GeoHack usesdim: to select amap scale such that the viewing circle appears roughly 10 centimetres (4 in) in diameter on a 72dpi computer monitor. If nodim:,type:, orscale: parameters are provided, GeoHack uses its default viewing circle of 30 kilometres (19 mi).
Theregion: parameter specifies the political region for terrestrial coordinates. It is used to select appropriate map resources. If noregion: parameter is provided,GeoHack attempts to determine the region from the coordinates.
The region should be supplied as either a two characterISO 3166-1 alpha-2 country code or anISO 3166-2 region code.
Very rough mapping is provided on geohack for almost all supported globes. The pop-out WikiMiniAtlas system provides limited mapping for Moon, Mars, Mercury, Venus, Io, and Titan, as of February 2021[update].
The maps roughly implies a coordinate reference system, but does not clearly specify one (unlike Earth's WGS84). Since the template defaults to east longitude, the|W| direction must be specified for globes that measure longitude westward. For celestial coordinates, use{{Sky}} instead.
source:S
Specifies, where present, the data source and data source format/datum, and optionally, the original data, presented in parentheses. This is initially primarily intended for use by geotagging robots, so that data is not blindly repeatedly copied from format to format and Wikipedia to Wikipedia, with progressive loss of precision and attributability.
Examples:
A lat/long geotag derived from anOrdnance SurveyNational Grid Reference NM 435 355 found in the English-language Wikipedia would be tagged as "source:enwiki-osgb36(NM435355)"
A latitude-longitude location sourced from data taken from the German-language Wikipedia would be tagged as "source:dewiki" – and so on, for other language codes;
A location sourced from the public domainGeoNet Names Server database would be tagged as "source:GNS". No datum or format information is needed, since by default all Wikipedia coordinates are in latitude/longitude format based on theWGS84 datum. Similarly, US locations sourced from the similar public domainGNIS database would be tagged as "source:GNIS".
Per-user display customization
To always display coordinates as DMS values, add this toyour common.css:
If CSS is disabled, or you have an old copy ofMediaWiki:Common.css cached, you will see both formats. (You can either clear your cache or manually refresh this URL:[1].)
To disable display of the blue globe adjacent to coordinates, add this toyour common.js:
The template has some input checks built in. Most errors display abold, red message inline and categorize the article in thehiddenmaintenance categoryPages with malformed coordinate tags. There are currently38 pages in that category. See the category description for further instructions.
The class namesgeo,latitude andlongitude are used to generate the microformat andMUST NOT be changed.
History
This template used to use a lot ofsub templates but these have all been replaced by{{Coordinates}}.
Template Data
This template usesoverloading which does not work well with theVisualEditor/TemplateData. Consider using "Edit source" instead of the visual editor until this defect is corrected. To facilitate visual editing in the meantime, consider using{{coordDec}} for signed decimal degrees,{{coordDMS}} when degrees minutes and seconds are specified, and{{coordDM}} when just degrees and minutes are given.
Encodes the latitude and longitude coordinates of a location, provides a link to map of the location. This template does not work well with the Visual Editor, consider using {{coordDec}} for signed decimal degrees, {{coordDMS}} when degrees minutes and seconds are specified {{coordDM}} when only degrees and minutes are specified. To use this template you will need to use positional parameter following one of these schemes: {{coord | D | M | S | NS | D | M | S | EW | geo | opts}}, {{coord | D | M | NS | D | M | EW | geo | opts}}, {{coord | D| NS | D| EW | geo | opts}} {{coord | sD | sD | geo | opts}} where D is degrees, M is minutes, S seconds, sD signed decimal degrees, NS is N or S, EW is E or W, opts are named parameter and geo are the coordinate parameters described on the main doc page.