Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Parameters  





3 Available maps  





4 Examples  





5 Template data  





6 See also  














Template:Location map+






Адыгэбзэ
Afrikaans
Alemannisch
Алтай тил
Anarâškielâ
العربية

Asturianu

Avañe'
Авар
Azərbaycanca
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Basa Banyumasan
Башҡортса
Беларуская
Беларуская (тарашкевіца)
Български
Boarisch
Bosanski
Brezhoneg
Català
Чӑвашла
Cebuano
Čeština
Chi-Chewa
ChiShona
Dansk
الدارجة
Deutsch
Dolnoserbski

Eesti
Ελληνικά
Español
Esperanto
Euskara
فارسی
Føroyskt
Français
Frysk
Gaeilge
Gagauz
Galego
ГӀалгӀай
گیلکی

/Hak-kâ-ngî
Хальмг

Hausa
Հայերեն
ि
Hornjoserbsce
Hrvatski
Ilokano
Bahasa Indonesia
Ирон
IsiXhosa
Íslenska
Italiano
עברית
Къарачай-малкъар

Қазақша
Kurdî
Кыргызча
Ladin
Latviešu
Lietuvių
Ligure
Magyar
Македонски



مصرى

Bahasa Melayu
Мокшень
Монгол

Nederlands
Nedersaksies


Нохчийн
Nordfriisk
Norfuk / Pitkern
Norsk bokmål
Norsk nynorsk
Novial
Occitan
Олык марий
Oʻzbekcha / ўзбекча

Pälzisch
پنجابی

Перем коми

Português
Română
Rumantsch
Русиньскый
Русский
Саха тыла

Scots
Shqip

Simple English
سنڌي
Slovenčina
Slovenščina
کوردی
Српски / srpski
Srpskohrvatski / српскохрватски
Sunda
Suomi
Svenska
Tagalog
ி
Tarandíne
Татарча / tatarça
 
Tetun


Тоҷикӣ
Türkçe
Türkmençe
Удмурт
Basa Ugi
Українська
اردو
Vèneto
Tiếng Vit
Yorùbá

Zazaki

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Meta-Wiki
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Blore Heath
Barnet
East Stoke
Tewkesbury
Berwick

Berwick

London

London

York

York

Plymouth

Plymouth

Poole

Poole

Wem

Wem

Northumberland

Northumberland

Shrewsbury

Shrewsbury

Milford Haven

Milford Haven

Battle of Bosworth Field other battles

{{Location map+}} places one or more location marks on a map, with optional labels. It is in the same family of templates as the Location map template and the documentation for that template might be helpful.

Template:Location map+ uses a helper template, {{Location map~}}, one or more times to generate a mark for each location.

Usage

Main template (one per map) Helper template (one per location to be marked)
Multi-line style
{{Location map+
| {{{1}}}
| width          =
| float          =
| border         =
| caption        =
| alt            =
| maplink        =
| relief         =
| AlternativeMap =
| overlay_image  =
| places         =
}}
{{Location map~
| {{{1}}}
| label       =
| label_size  =
| label_width =
| position    =
| background  =
| mark        =
| marksize    =
| link        =
| lat_deg     =
| lon_deg     =
}}
{{Location map~
| {{{1}}}
| label       =
| label_size  =
| label_width =
| position    =
| background  =
| mark        =
| marksize    =
| link        =
| lat_deg     =
| lat_min     =
| lat_sec     =
| lat_dir     =
| lon_deg     =
| lon_min     =
| lon_sec     =
| lon_dir     =
}}
{{Location map~
| {{{1}}}
| label       =
| label_size  =
| label_width =
| position    =
| background  =
| mark        =
| marksize    =
| link        =
| coordinates =
}}
Single-line style
{{Location map~ |{{{1}}} |label_size= |label_width= |background= |marksize= |mark= |lat_deg= |lon_deg= |position= |label= |link=}}
{{Location map~ |{{{1}}} |label_size= |label_width= |background= |marksize= |mark=  |lat_deg= |lat_min= |lat_sec= |lat_dir= |lon_deg= |lon_min= |lon_sec= |lon_dir= |position= |label= |link=}}
{{Location map~ |{{{1}}} |label_size= |label_width= |background= |marksize= |mark= |coordinates= |position= |label= |link=}}

Note: in single-line style, parameters order is chosen so that it's easier to maintain vertical alignment in subsequent {{Location map~}} calls (which improves wikicode readability). Parameters that are rarely given values, or those whose values (usually) have constant or only slightly varying lengths (in characters), are placed first; parameters whose values frequently have very different lengths are placed last. See an example below (note the alignment of |marksize= and |position= parameters in the wiki mark-up).

Parameters

Parameters for Location map+
Parameter Description
{{{1}}} Required. Use the name of the map as the first unnamed parameter. For example, specifying England will use the values for England in Module:Location map/data/England if it exists, or {{Location map England}} otherwise. See the examples below or all subpages.
width Determines the width of the map in pixels, overriding any default values. Do not include px: for example, use width=300, not width=300px.
default_width Determines the default width of the map in pixels, intended for use by templates e.g. place infoboxes. The default value is 240. Do not include px. This value will be multiplied by the defaultscale parameter specified in individual map templates, if it exists, in order to achieve an appropriate size for vertical maps. For example, if default_width=200 is given, a map of Thailand will be displayed with a width of 200×0.57 = 114 pixels (as specified in Module:Location map/data/Thailand).
float Specifies the position of the map on the page. Valid values are left, right, center and none. The default is right.
border Specifies the color of the 1px map border. The default is lightgrey (see web colors). If set to none, no border will be generated. This parameter is seldom used. Special value: infobox.
caption The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the label parameter (or the current page name if label not defined) and the name parameter from map definition template. See the examples below.
alt Alt text for map; used by screen readers, see WP:ALT.
maplink Specifies a wiki link that will be followed when clicking the map, by default to the map source file. Can be deactivated with maplink =, which can be useful to avoid mis-clicks if there are links associated with markers and labels.
relief Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as image1, which is usually a relief map. See the example at Location map+/relief. Other numerical values such as 2or3 will display image2orimage3, if those images are defined.
AlternativeMap Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap.
overlay_image Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay.
places Specifies one or more place markers using {{Location map~}}.
Parameters for Location map~
Parameter Description
{{{1}}} Required. Use the name of the map as the first unnamed parameter. For example, specifying England will use the values for England in Module:Location map/data/England if it exists, or {{Location map England}} otherwise. See the examples below.
Label
label The text of the label to display next to the mark. A wiki link can be used. The default if not specified is no label, just the marker. Do not use <div>...</div> tags to attempt to position the label; use |label_size= and |position= instead.
label_size The font size to use for the label, given as a percentage of the label's (already reduced) normal font size (<100 = smaller, >100 = larger). The default is 91; obey MOS:FONTSIZE if setting to a lower value. Do not include %: for example, use label_size=95, not label_size=95%. If set to 0, the label is displayed only when the user hovers over the mark.
label_width The width to use for the label, given as an em size; the default width is 6. Do not include em: for example, use |label_width=7, not |label_width=7em.
position The position of the label relative to the mark. Valid values are left, right, top and bottom. The default is right.
background The background color to use for the label. See Web colors. The default is no background color, which shows the map image behind the label.
Mark
mark The name of an image to display as the mark. The default is Red pog.svg (). More mark images are available, in particular, at Commons:Location markers and Commons:Category:Map icons.
marksize The size of the mark in pixels. The default is 8. Do not include px: for example, use marksize=10, not marksize=10px.
link Specifies a wiki link which will be followed if the reader clicks on the mark. Do not include [[]]: for example, use link=Yellowstone National Park, not link=[[Yellowstone National Park]].
Coordinates
lat_deg Usual Required. The degrees of latitude, using decimal degrees. Logically, use negative number for southern latitude.
lon_deg Required. The degrees of longitude, using decimal degrees. Logically, use negative number for western longitude.
lat_deg Detailed Required. The degrees of latitude. The minutes and, probably, the seconds must be specified.[Note 1]
lat_min The minutes of latitude.[Note 1] The sign should match that of lat_deg.
lat_sec The seconds of latitude. Usually not necessary.[Note 1] The sign should match that of lat_deg.
lat_dir N if north (default value) or S for south of the Equator. Other values will be disregarded.
lon_deg Required. The degrees of longitude. The minutes and, probably, the seconds must be specified.[Note 1]
lon_min The minutes of longitude.[Note 1] The sign should match that of lon_deg.
lon_sec The seconds of longitude. Usually not necessary.[Note 1] The sign should match that of lon_deg.
lon_dir E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded.
cooordinates Alternative The coordinates using {{Coord}} template, e.g. {{coord|48.067|-2.863}}.

Notes:

  1. ^ a b c d e f Appropriate precision should be used. For example, the whole US map, with a 1000‑pixel width, has a resolution of about 5 km/pixel. Only 2 decimal places of precision in decimal degrees format (≈1 km), or whole minutes (≈1.7 km) in DMS format, are required.

Available maps

Location maps can be found using these sources:

Special:PrefixIndex/Module:Location map/data/ - checked before a map template is searched for. New maps should be created here rather than creating new templates.
List of templates - 1050 templates were available when the list was generated.
Category:Location map modules - templates sorted by category.
Special:WhatLinksHere/Template:Location map/Info - a search that might help.
Special:Prefixindex/Template:Location map - another search that might help.

Examples

This example does not designate the caption parameter. It demonstrates the use of the defaults. Notice that the default caption is the page name followed by the map name in parenthesis and that the label position is automatically adjusted if it is too close to an edge.

Location map+ is located in Australia
Sydney

Sydney

Melbourne

Melbourne

Location map+ (Australia)

{{Location map+ | Australia
| places =
  {{Location map~ | Australia
    | label = Sydney
    | lat_deg = -33.86
    | lon_deg = 151.21 }}
  {{Location map~ | Australia
    | label = Melbourne
    | coordinates = {{coord|-37.81|144.96}}
  }}
}}
}}

This example uses a designated but empty caption. It demonstrates coordinates using decimal degrees, a 10px mark with a link, and {{Location map~}} entries listed in single-line style.

Location map+ is located in France
Paris

Paris

Marseille

Marseille

{{Location map+ | France
| caption =
| places =
  {{Location map~ |France |marksize=10|lat_deg=48.8567 |lon_deg=2.3508 |position=top    |label=Paris     |link=Paris    }}
  {{Location map~ |France |marksize=9|lat_deg=43.2964 |lon_deg=5.3610 |position=bottom |label=Marseille |link=Marseille}}
}}

This example uses caption with an assigned value. It demonstrates coordinates in degree, minute, second format, a relief map, label background color and linked labels.

alt text for San Francisco
Some cites in the United States
{{Location map+ | USA
| width = 300
| caption = Some cites in the United States
| relief =1| places =
  {{Location map~ | USA
    | label = [[New York City|New York]]
    | position =
    | background = white
    | mark = Cyan pog.svg
    | alt = alt text for New York City
    | link = New York City
    | lat_deg =40| lat_min =43| lat_dir =N| lon_deg =74| lon_min = 0  | lon_dir =W}}
  {{Location map~| USA
    | label = [[San Francisco]]
    | position =
    | background = white
    | mark = Purple pog.svg
    | alt = alt text for San Francisco
    | link = San Francisco
    | lat_deg =37| lat_min =46| lat_dir =N| lon_deg = 122 | lon_min =25| lon_dir =W}}
}}

Also see the examples for {{Location map}} and {{Location map many}}, as well as:

Template data

TemplateData documentation used by VisualEditor and other tools

See a monthly parameter usage report for Template:Location map+ in articles based on its TemplateData.

TemplateData for Location map+

This template places one or more location marks on a map.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Map name1

The name of the map to be used

Stringrequired
Map widthwidth

Determines the width of the map in pixels, overriding any default values. Do not include "px", for example: "300", not "300px".

Numberoptional
Default widthdefault_width

Determines the default width of the map in pixels, intended for use by templates such as infoboxes. The default value is 240. Do not include "px". This value will be multiplied by the defaultscale parameter specified in individual map templates, if it exists, in order to achieve an appropriate size for vertical maps.

Numberoptional
Positionfloat

Specifies the position of the map on the page. Valid values are left, right, center and none. The default is right.

Stringoptional
Frame styleborder

Specifies the color of the map frame when the parameter caption is used. If set to none, no border will be generated.

Suggested values
none infobox LightGray
Stringoptional
Map captioncaption

The text of a caption to be displayed below the map. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated.

Stringoptional
Alt textalt

Alt text for map; used by screen readers.

Stringoptional
Alternative map from templaterelief

Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as image1, which is usually a relief map. If more than one relief map is defined, "2" will display "image2", and so on.

Stringoptional
Alternative map not from templateAlternativeMap

Allows the use of an alternative map. The image must have the same edge coordinates as the map template.

Stringoptional
Overlay imageoverlay_image

Allows an overlay to be superimposed on the map. This parameter is seldom used.

Stringoptional
Place markersplaces

Specifies one or more place markers using Location map~.

Stringrequired

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Location_map%2B&oldid=786037558"

Categories: 
Lua-based templates
Location map templates
Graphics templates
Hidden categories: 
Wikipedia template-protected templates
Templates using TemplateData
 



This page was last edited on 16 June 2017, at 21:44 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki