模板:Location map/doc
腳本錯誤:沒有「Message box」這個模塊。 腳本錯誤:沒有「High-use」這個模塊。
腳本錯誤:沒有「Location map」這個模塊。 本模板生成一個由地圖和位置標記組成的複合圖像,還可以添加標籤和說明文字。
用法[編輯]
本模板不直接讀取地圖圖像文件,而是通過輔助地圖模板定義。例如,如果提供給本模板的第一個匿名參數是Japan,那麼本模板將使用Module:Location map/data/Japan中的數據(如果存在),這些數據包含生成複合圖像所需的信息。
注意事項[編輯]
|caption=參數填寫任何值會使得地圖顯示邊框(即縮略圖樣式);如果|caption=留空則顯示默認標題,但無邊框;如果不使用|caption=參數,則不顯示標題且無邊框。- 坐標不會被檢查。如果指定的坐標超出了地圖圖像的區域,位置標記將不會顯示在圖像內部,但可能會顯示在頁面的其他地方。
- 設置地圖大小時不要使用
px,如使用|width=200,而不是|width=200px。 - 本模板僅支持顯示單個位置標記,要創建帶有多個位置標記的地圖,請使用{{Location map+}}或{{Location map many}}。
空白模板[編輯]
| 十進制度數 | 度、分、秒 | 使用{{Coord}} (通常用於信息框) |
由維基數據提供坐標 |
|---|---|---|---|
{{Location map|{{{1}}}
| width =
| float =
| border =
| caption =
| alt =
| relief =
| AlternativeMap =
| overlay_image =
| label =
| label_size =
| position =
| background =
| mark =
| marksize =
| link =
| lat_deg =
| lon_deg =
}}
|
{{Location map|{{{1}}}
| width =
| float =
| border =
| caption =
| alt =
| relief =
| AlternativeMap =
| overlay_image =
| label =
| label_size =
| position =
| background =
| mark =
| marksize =
| link =
| lat_deg =
| lat_min =
| lat_sec =
| lat_dir =
| lon_deg =
| lon_min =
| lon_sec =
| lon_dir =
}}
|
{{Location map|{{{1}}}
| width =
| float =
| border =
| caption =
| alt =
| relief =
| AlternativeMap=
| overlay_image =
| label =
| label_size =
| position =
| background =
| mark =
| marksize =
| coordinates=
}}
|
{{Location map|{{{1}}}
| width =
| float =
| border =
| caption =
| alt =
| relief =
| AlternativeMap=
| overlay_image =
| label =
| label_size =
| position =
| background =
| mark =
| marksize =
}}
|
參數說明[編輯]
Template:TemplateData header <templatedata> { "params": { "1": { "label": "地圖名稱", "description": "要使用的地圖名稱。可以用 「#」分隔的形式提供多個地圖。 ", "type": "string", "required": true }, "width": { "description": "地圖的寬度,以像素(px)為單位;不要包含 「px」。例如,填寫 「width=300」,而不是 「width=300px」。 ", "label": "地圖寬度 ", "type": "number" }, "default_width": { "description": "地圖的默認寬度,以像素(px)為單位,不要包含 「px」。供模板(例如地理類信息框)使用;默認值為240。該值將乘以各個地圖模板中指定的defaultscale參數(如果存在),以獲得垂直地圖的適當大小。例如,如果給定default_width=200,將顯示寬度為200×0.57=114像素的泰國地圖(如模塊:Location map/data/Thailand中所述)。", "label": "默認寬度", "type": "number" }, "float": { "description": "指定地圖在頁面上的位置;有效值包括「left」、「right」、「center」和「none」。默認值是「right」。", "label": "位置", "type": "string", "suggestedvalues": [ "left", "right", "center", "none" ], "default": "right" }, "border": { "description": "指定使用caption參數時地圖邊框的顏色。如果設置為 「none」,則不會生成邊框。 ", "label": "邊框樣式", "type": "string" }, "caption": { "description": "顯示在地圖下方的說明文字;指定說明文字後地圖將顯示邊框。如果定義了caption但未賦值,則地圖不會顯示邊框,也不會顯示說明文字。如果未定義caption,則地圖將不會顯示邊框,並生成默認說明文字。", "label": "地圖說明", "type": "string" }, "alt": { "description": "地圖的替代文字;供屏幕閱讀器使用。 ", "label": "替代文字", "type": "string" }, "relief": { "description": "任何非空值(1、yes等)都會導致模板將地圖定義模板中指定的地圖顯示為image1,這通常是一張地形圖;請參見模板:Location map+/relief上的示例。", "label": "顯示備選地圖", "type": "string" }, "AlternativeMap": { "label": "自定義備選地圖", "description": "允許使用自定義的地圖圖像;圖像邊緣的坐標必須與所使用的定位圖模板相同。 ", "type": "string" }, "overlay_image": { "label": "疊加圖像", "description": "允許在地圖上疊加疊加層;該參數很少使用。", "type": "string" }, "label": { "label": "標籤文字", "description": "顯示在位置標記旁邊的標籤文字;可以添加內部鏈接。 ", "type": "string" }, "label_size": { "label": "標籤大小", "description": "標籤文字的字體大小,以相當於正常大小的百分比表示;請勿包含「%」。 ", "type": "number" }, "label_width": { "label": "標籤寬度", "description": "標籤的寬度,以em為單位;請勿包含「em」。", "type": "number" }, "position": { "label": "標籤位置", "description": "標籤相對於位置標記的位置;有效值為 「left」、「right」、「top」、「bottom 」和 「none」。默認為 「left 」或 「right」(取決於位置標記在地圖中的位置)。當 設置「position=none 」時,不會顯示標籤,但標籤文字可被用於默認地圖說明。", "type": "string", "suggestedvalues": [ "left", "right", "top", "bottom ", "none" ] }, "background": { "label": "標籤背景顏色", "description": "標籤的背景顏色。 ", "type": "string" }, "mark": { "label": "位置標記圖像", "description": "位置標記顯示的圖像文件名。 ", "type": "wiki-file-name" }, "marksize": { "label": "位置標記大小", "description": "位置標記的大小,以像素(px)為單位;不包括「px」。 ", "type": "number" }, "link": { "label": "位置標記鏈接", "description": "指定一個內部鏈接,讀者點擊位置標記時跳轉。", "type": "wiki-page-name" }, "coordinates": { "label": "坐標", "description": "在地圖上顯示的位置標記的坐標,通常使用腳本錯誤:沒有「Coordinates」這個模塊。模板。" }, "lat_deg": { "type": "number" }, "lat_min": { "type": "number" }, "lat_sec": { "type": "number" }, "lat_dir": { "type": "string", "suggestedvalues": [ "N", "S" ] }, "lon_deg": { "type": "number" }, "lon_min": { "type": "number" }, "lon_sec": { "type": "number" }, "lon_dir": { "type": "string", "suggestedvalues": [ "E", "W" ] } }, "paramOrder": [ "1", "width", "default_width", "float", "border", "caption", "alt", "relief", "AlternativeMap", "overlay_image", "label", "label_size", "label_width", "position", "background", "mark", "marksize", "link", "coordinates", "lat_deg", "lat_min", "lat_sec", "lat_dir", "lon_deg", "lon_min", "lon_sec", "lon_dir" ], "description": "該模板在地圖上放置位置標記。", "format": "block" } </templatedata>
可用地圖[編輯]
說明:若需要更多列表,請前往Special:PrefixIndex/Module:Location_map/data並點擊右上角的「下一頁」。 Template:Collapse bottom
- Location map
- Location map+
- Location map+/doc
- Location map/Info
- Location map/doc
- Location map Afghanistan
- Location map Albania
- Location map Algeria
- Location map Andorra
- Location map Angola
- Location map Antarctica
- Location map Antigua and Barbuda
- Location map Argentina
- Location map Armenia
- Location map Australia
- Location map Australia New South Wales
- Location map Australia Northern Territory
- Location map Australia Queensland
- Location map Australia South Australia
- Location map Australia Tasmania
- Location map Australia Victoria
- Location map Australia Western Australia
- Location map Austria
- Location map Azerbaijan
- Location map Bahamas
- Location map Bahrain
- Location map Bangladesh
- Location map Barbados
- Location map Belarus
- Location map Belgium
- Location map Belize
- Location map Benin
- Location map Berkshire
- Location map Bhutan
- Location map Bolivia
- Location map Bosnia
- Location map Botswana
- Location map Brazil
- Location map Brunei
- Location map Buckinghamshire
- Location map Bulgaria
- Location map Burkina Faso
- Location map Burundi
- Location map Cambodia
- Location map Cambridgeshire
- Location map Cameroon
- Location map Canada
- Location map Canada Alberta
- Location map Canada British Columbia
- Location map Canada Manitoba
- Location map Canada New Brunswick
- Location map Canada Newfoundland and Labrador
- Location map Canada Nova Scotia
- Location map Canada Ontario
- Location map Canada PEI
- Location map Canada Quebec
- Location map Canada Saskatchewan
- Location map Canary Islands
- Location map Cape Verde
- Location map Central African Republic
- Location map Chad
- Location map Cheshire
- Location map Chile
- Location map China
- Location map China Henan
- Location map Colombia
- Location map Comoros
- Location map Cornwall
- Location map Costa Rica
- Location map Croatia
- Location map Cuba
- Location map Cumbria
- Location map Cyprus
- Location map Czech Republic
- Location map Côte d'Ivoire
- Location map Democratic Republic of the Congo
- Location map Denmark
- Location map Devon
- Location map Djibouti
- Location map Dominica
- Location map Dominican Republic
- Location map East Timor
- Location map Ecuador
- Location map Egypt
- Location map El Salvador
- Location map England and Wales
- Location map Equatorial Guinea
- Location map Eritrea
- Location map Essex
- Location map Estonia
- Location map Ethiopia
- Location map Fiji
- Location map Finland
- Location map France
- Location map France Paris
- Location map Gabon
- Location map Gambia
- Location map Georgia
- Location map Germany
- Location map Ghana
- Location map Gloucestershire
- Location map Greece
- Location map Greenland
- Location map Grenada
- Location map Guatemala
- Location map Guinea
- Location map Guinea-Bissau
- Location map Guyana
- Location map Haiti
- Location map Hampshire
- Location map Hertfordshire
- Location map Honduras
- Location map Hong Kong
- Location map Hungary
- Location map Iceland
- Location map India
- Location map India Meghalaya
- Location map Indonesia
- Location map Iran
- Location map Iraq
- Location map Ireland
- Location map Isle of Wight
- Location map Israel
- Location map Italy
- Location map Jamaica
- Location map Japan Okinawa
- Location map Jordan
- Location map Kazakhstan
- Location map Kent
- Location map Kenya
- Location map Kosovo
- Location map Kuwait
- Location map Kyrgyzstan
- Location map Lancashire
- Location map Laos
- Location map Latvia
- Location map Lebanon
- Location map Lesotho
- Location map Liberia
- Location map Libya
- Location map Liechtenstein
- Location map Lincolnshire
- Location map Lithuania
- Location map Luxembourg
- Location map Madagascar
- Location map Malawi
- Location map Malaysia
- Location map Maldives
- Location map Mali
- Location map Malta
- Location map Maluku Topography
- Location map Mars
- Location map Marshall islands
- Location map Mauritania
- Location map Mauritius
- Location map Mexico
- Location map Moldova
- Location map Monaco
- Location map Mongolia
- Location map Montenegro
- Location map Morocco
- Location map Mozambique
- Location map Myanmar
- Location map Namibia
- Location map Nepal
- Location map Netherlands
- Location map New Zealand
- Location map New Zealand North Island
- Location map Nicaragua
- Location map Niger
- Location map Nigeria
- Location map Norfolk
- Location map North Korea
- Location map Northern Ireland
- Location map Norway
- Location map Oman
- Location map Oxfordshire
- Location map Pakistan
- Location map Palau
- Location map Panama
- Location map Papua New Guinea
- Location map Paraguay
- Location map Peru
- Location map Philippines
- Location map Poland
- Location map Portugal
- Location map Portugal Madeira
- Location map Qatar
- Location map Republic of Macedonia
- Location map Republic of the Congo
- Location map Romania
- Location map Russia
- Location map Rwanda
- Location map Samoa
- Location map San Marino
- Location map Sao Tome and Principe
- Location map Saudi Arabia
- Location map Senegal
- Location map Serbia
- Location map Seychelles
- Location map Shropshire
- Location map Sierra Leone
- Location map Singapore
- Location map Slovakia
- Location map Slovenia
- Location map Solomon Islands
- Location map Somalia
- Location map South Africa
- Location map South Korea
- Location map South Yorkshire
- Location map Spain
- Location map Sri Lanka
- Location map Sudan
- Location map Suriname
- Location map Swaziland
- Location map Sweden
- Location map Switzerland
- Location map Syria
- Location map Taiwan
- Location map Tajikistan
- Location map Tanzania
- Location map Thailand
- Location map Togo
- Location map Tonga
- Location map Trinidad and Tobago
- Location map Tunisia
- Location map Turkey
- Location map Turkmenistan
- Location map Tyne and Wear
- Location map UK England
- Location map UK Scotland
- Location map USA
- Location map USA Alabama
- Location map USA Alaska
- Location map USA Arizona
- Location map USA Arkansas
- Location map USA California
- Location map USA Colorado
- Location map USA Connecticut
- Location map USA Delaware
- Location map USA Florida
- Location map USA Georgia
- Location map USA Hawaii
- Location map USA Idaho
- Location map USA Illinois
- Location map USA Indiana
- Location map USA Iowa
- Location map USA Kansas
- Location map USA Kentucky
- Location map USA Louisiana
- Location map USA Maine
- Location map USA Maryland
- Location map USA Massachusetts
- Location map USA Michigan
- Location map USA Minnesota
- Location map USA Mississippi
- Location map USA Missouri
- Location map USA Montana
- Location map USA Nebraska
- Location map USA Nevada
- Location map USA New Hampshire
- Location map USA New Jersey
- Location map USA New Mexico
- Location map USA New York
- Location map USA North Carolina
- Location map USA North Dakota
- Location map USA Ohio
- Location map USA Oklahoma
- Location map USA Oregon
- Location map USA Pennsylvania
- Location map USA Rhode Island
- Location map USA South Carolina
- Location map USA South Dakota
- Location map USA Tennessee
- Location map USA Texas
- Location map USA Utah
- Location map USA Vermont
- Location map USA Virginia
- Location map USA Washington
- Location map USA West Virginia
- Location map USA Wisconsin
- Location map USA Wyoming
- Location map Uganda
- Location map Ukraine
- Location map United Arab Emirates
- Location map United Kingdom
- Location map United Kingdom Bedfordshire
- Location map United Kingdom Dorset
- Location map United Kingdom East Sussex
- Location map United Kingdom Greater London
- Location map United Kingdom Staffordshire
- Location map Uruguay
- Location map Uzbekistan
- Location map Vanuatu
- Location map Venezuela
- Location map Vietnam
- Location map Wales
- Location map West Yorkshire
- Location map Western Sahara
- Location map Worcestershire
- Location map World
- Location map Yemen
- Location map Zambia
- Location map Zimbabwe
- Location map many
- Location map 大曼徹斯特郡
- Location map~
說明:若需要更多列表,請前往Special:PrefixIndex/Template:Location_map_並點擊右上角的「下一頁」。 Template:Collapse bottom
同時可以參閱Category:地理位置圖模板(現時還很不完整,但對於一些子類很有用)。
注意:當調用的地圖同時存在於Module:Location map/data/……、{{Template:Location map location ……}}中時,優先顯示Module:Location map/data/……中的地圖。
建立新地圖步驟[編輯]
- 找到一幅合適的使用正距圓筒圖法的空白地圖
- 以「Module:Location map/data/location」的名稱建立模板(可從其他地圖模板複製過來,並輸入相關數據)
參見:Template:Tsl
範例[編輯]
帶默認說明的地圖(度/分)[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| alt = 位於島上的帕格
| lat_deg = 44 | lat_min = 26
| lon_deg = 15 | lon_min = 3
}}
帶默認說明的地圖(十進制坐標)[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| alt = 位於島上的帕格
| lat_deg = 44.44
| lon_deg = 15.05
}}
帶默認說明和替代文字的地圖[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| width = 200
| float = right
| alt = 位於島上的帕格
| label = 帕格
| position = right
| mark = Green pog.svg <!--绿色标示点-->
| lat_deg = 44 | lat_min = 26 <!-- default: lat_dir = N -->
| lon_deg = 15 | lon_min = 3 <!-- default: lon_dir = E -->
}}
標示和標籤位於地圖之外[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| width = 200
| float = right
| caption =
| alt = 里米尼在意大利的位置(地圖之外)
| lat_deg = 44.05
| lon_deg = 12.57 <!--outside map's left border at 13.1-->
| outside = 1 <!-- we're aware the point is outside the map, so suppress the warning category -->
| label = 里米尼
| position = right
}}
帶自定義說明和文字背景的地圖[編輯]
Imotski
{{Location map
|Croatia
|label=Imotski
|lat=43.44
|long=17.21
|position=right
|width=300
|float=right
|background=#FFFFDD
|caption=Imotski 在克罗地亚的位置
}}
|
腳本錯誤:沒有「Location map」這個模塊。 |
標示和標簽都放大了的地圖[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Italy
| width = 200
| float = right
| caption = 里米尼在意大利的位置
| alt = 意大利的地圖,標記顯示里米尼的位置
| label = 里米尼
| label_size = 150 <!--150% of normal size-->
| position = bottom
| background = orange
| mark = Orange_pog.svg
| marksize = 12 <!--size in pixels-->
| lat_deg = 44.05
| lon_deg = 12.57
}}
腳本錯誤:沒有「anchor」這個模塊。
不帶說明的地圖[編輯]
Brčko(波斯尼亞和黑塞哥維那)
{{Location map
|Bosnia
|label=Brčko
|position=left
|width=150
|lat=44.87
|long=18.81
|float=right
|caption=
}}
|
腳本錯誤:沒有「Location map」這個模塊。 |
腳本錯誤:沒有「anchor」這個模塊。
地形圖參數[編輯]
Also demonstrates automatic positioning of label to the left, due to far right position of mark. 腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Nepal
| relief = yes
| caption = Location of Biratnagar Airport in Nepal
| alt = Biratnagar Airport is located in southeastern Nepal
| label = Biratnagar
| mark = Airplane silhouette.svg
| marksize = 10
| lat_deg = 26 | lat_min = 28 | lat_sec = 53 | lat_dir = N
| lon_deg = 87 | lon_min = 15 | lon_sec = 50 | lon_dir = E
}}
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Nepal
| relief =
| caption = Location of Biratnagar Airport in Nepal
| alt = Biratnagar Airport is located in southeastern Nepal
| label = Biratnagar
| mark = Airplane silhouette.svg
| marksize = 10
| lat_deg = 26 | lat_min = 28 | lat_sec = 53 | lat_dir = N
| lon_deg = 87 | lon_min = 15 | lon_sec = 50 | lon_dir = E
}}
腳本錯誤:沒有「anchor」這個模塊。
置換成其它地圖的參數(AlternativeMap)[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Italy
| AlternativeMap = Italy location map.svg
| width = 200
| float = right
| caption = 羅馬在意大利的位置
| alt = 意大利的地圖,標記顯示羅馬的位置
| label = 羅馬
| lat_deg = 41.9
| lon_deg = 12.5
}}
腳本錯誤:沒有「anchor」這個模塊。
在不同地圖顯示同一坐標[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Scotland
| relief = 1
| width = 180
| float = right
| caption = Lockerbie in Scotland, UK
| alt = Lockerbie is in southern Scotland.
| label = Lockerbie
| mark = Blue_pog.svg
| marksize = 9
| lat_deg = 55 | lat_min = 07 | lat_sec = 16 | lat_dir = N
| lon_deg = 03 | lon_min = 21 | lon_sec = 19 | lon_dir = W
}}
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | United Kingdom
| relief = 1
| width = 180
| float = right
| caption = Lockerbie in Scotland, UK
| alt = Lockerbie is in southern Scotland.
| label = Lockerbie
| mark = Blue_pog.svg
| marksize = 9
| lat_deg = 55 | lat_min = 07 | lat_sec = 16 | lat_dir = N
| lon_deg = 03 | lon_min = 21 | lon_sec = 19 | lon_dir = W
}}
西半球[編輯]
腳本錯誤:沒有「Location map/multi」這個模塊。
{{Location map many | United Kingdom
| width = 180
| float = right
| caption = 蘇格蘭的洛克比
| label = 洛克比
| position = right
| lat_deg = 55 | lat_min=07 | lat_sec=16 | lat_dir=N
| lon_deg = 3 | lon_min=21 | lon_sec=19 | lon_dir=W
}}
幅員超過180°經度的國家[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Fiji
| width = 180
| float = right
| label = 蘇瓦
| position = right
| background = yellow
| mark = Locator_Dot.png
| marksize = 7
| lat_deg = 18 | lat_min = 8 | lat_sec = 0 | lat_dir = S
| lon_deg = 178 | lon_min = 26 | lon_sec = 0 | lon_dir = E
}}
用戶選擇多個地圖[編輯]
腳本錯誤:沒有「Location map」這個模塊。
{{Location map | UK Scotland#UK
| relief = 1
| width = 180
| float = right
| caption = Lockerbie in Scotland, UK
| alt = Lockerbie is in southern Scotland.
| label = Lockerbie
| mark = Blue_pog.svg
| marksize = 9
| lat_deg = 55 | lat_min = 07 | lat_sec = 16 | lat_dir = N
| lon_deg = 03 | lon_min = 21 | lon_sec = 19 | lon_dir = W
}}
「coordinates」與「lat_deg」「lat」[編輯]
如果「coordinates」參數與「lat_deg」參數同時使用,只有「coordinates」的值會生效。 腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| coordinates = {{Coord|42|26|N|14|3|E}}
| lat_deg = 44 | lat_min = 26
| lon_deg = 15 | lon_min = 3
}}
如果「coordinates」參數與「lat」參數同時使用,只有「coordinates」的值會生效。 腳本錯誤:沒有「Location map」這個模塊。
{{Location map | Croatia
| coordinates = {{Coord|42|26|N|14|3|E}}
| lat = 44.4333
| long = 15.05
| caption = “coordinates”參數優先於“lat”(“lat”等參數所示位置位於克羅地亞海岸)
}}
另請參見[編輯]
- Template:Location map many – 放置多個標示和標籤
- Template:Location map+ – 放置標示和標籤的長列表
- Template:Location map skew – 沿着匯合的經線做映射(非等距圓柱投影)
- commons:Category:Map pointers