Permanently protected template

Template:Location map

维基百科,自由的百科全书
跳转至: 导航搜索
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

基于现有采用等距圆柱投影的地图来创建一幅地理位置图作为自创图像,同时可以在其上进行标示并选择性地叠加标签。需要注意的是:

  • 使用“caption=xxx”可以给地图加上外边框(缺省的“caption=”则保留地图的无边框状态)
  • 标示和标签不会去检查经度和纬度的有效性,并且有可能被置于页面的任何位置,甚至超越页面底部
  • 要忽略标示,可以设置marksize=1,即1个像素的宽度
  • 地图需要设置宽度,例如“width=250”(省略输入“px”),否则图像将会拉伸至整个页面
  • 要放置多个标示和标签,请参看
  • 要沿着汇合的经线做映射,请参考:Template:Location_map_skew

用法

Location map在美国的位置
Location map
黃石在美國西北部的位置
十進制度 度、分、秒
{{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    = 
}}

可用地圖

模版{Template:Location map location}的列表(省略了前缀“Template:”):

说明:若需要更多列表,请前往Special:PrefixIndex/Template:Location_map_并点击右上角的“下一页”。

同时可以参阅Category:地理位置圖模板(现时还很不完整,但对于一些子类很有用)。

建立新地圖步驟

  1. 找到一幅合适的使用等距圆柱投影的空白地图
  2. 以「Template:Location map location」的名稱建立模板(可從其他地圖模板複製過來,並輸入相關數據)

參見:創建一個新地圖模版

例子

带默认说明的地图(度/分)

位於島上的帕格
位於島上的帕格
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 | 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 | 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在克罗地亚的位置
 }}
Imotski在克羅地亞的位置
Imotski
Imotski
Imotski在克罗地亚的位置

標示和標簽都放大了的地圖

意大利的地圖,標記顯示里米尼的位置
意大利的地圖,標記顯示里米尼的位置
里米尼
里米尼在意大利的位置
{{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
}}

不带说明的地图

Brčko (波斯尼亚和黑塞哥维那)
{{Location map
 |Bosnia
 |label=Brčko
 |position=left
 |width=150
 |lat=44.87
 |long=18.81
 |float=right
 |caption=
 }}
Brčko在波斯尼亚和黑塞哥维那的位置
Brčko
Brčko

Relief parameter

Also demonstrates automatic positioning of label to the left, due to far right position of mark.

Biratnagar Airport is located in southeastern Nepal
Biratnagar Airport is located in southeastern Nepal
Biratnagar
Location of Biratnagar Airport in Nepal
{{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
}}
Biratnagar Airport is located in southeastern Nepal
Biratnagar Airport is located in southeastern Nepal
Biratnagar
Location of Biratnagar Airport in Nepal
{{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
}}

置换成其它地图的参数(AlternativeMap)

意大利的地圖,標記顯示羅馬的位置
意大利的地圖,標記顯示羅馬的位置
羅馬
羅馬在意大利的位置
{{Location map | Italy
| AlternativeMap = Italy location map.svg
| width   = 200
| float   = right
| caption = 羅馬在意大利的位置
| alt     = 意大利的地圖,標記顯示羅馬的位置
| label   = 羅馬
| lat_deg = 41.9
| lon_deg = 12.5
}}

在不同地图显示同一坐标

Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
{{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
}}
Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
{{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在英國的位置
洛克比
洛克比
蘇格蘭的洛克比
{{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 | 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
}}

User selection of multiple maps

Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
{{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

如果coordinates參數與lat_deg參數同時使用,只有coordinates的填入坐標有效。

Location map在克羅地亞的位置
Location map
coordinates參數優先於lat_deg(lat_deg等參數所示位置位於克羅地亞海岸)
{{Location map | Croatia
| coordinates = {{Coord|42|26|N|14|3|E}}
| lat_deg = 44 | lat_min = 26
| lon_deg = 15 | lon_min = 3
}}

全部参数

参数 默认值 描述
{1}    
AlternativeMap= Location map {1}|image [[File: {}]]
background=   background-color: {};
border= #CCCCCC border: {};
caption=    
float=   float: {}; clear: {};
label= {PAGENAME}  
lat= 0  
lat_deg= 0  
lat_dir=    
lat_min= 0  
lat_sec= 0  
long= 0  
lon_deg= 0  
lon_dir=    
lon_min= 0  
lon_sec= 0  
mark= Red pog.svg [[File: {}]]
marksize= 8 [[File: {}px]]
font-size: {}px;
position= right  
width= 240 File: {}px
width: ({}+2)px;

參看