模板:Maplink/testcases
這是Template:Maplink及其沙盒的測試樣例。刷新本頁以更新內容。 如果這裏有許多複雜的模板的用例,可能會因為MediaWiki的技術限制而出錯。 您還可以用Special:展開模板來測試模板的使用效果。 您可以通過以下連結測試本模板在不同外觀下的效果: |
Maplink tag
編輯Mapframe tag
編輯{{Maplink|type=line|zoom=8|id=Q2108|frame=yes|frame-long=-82.9166|frame-lat=42.4934}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|frame-coordinates={{Coord|41.9|N|82.7|W}}|zoom=7|type=line|id=Q2108}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|zoom=8|type=line|plain=yes|id=Q2108|frame=yes|frame-long=-82.9166|frame-lat=42.4934}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||frame=yes|type=data|from=Sandbox/Evad37/St Georges Terrace.map}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||frame=yes|type=data|raw={{Wikipedia:Map data/Wikipedia KML/Interstate 45}}}}
{{Maplink}}
{{Maplink/sandbox}}
|lat|long
)|lat|S|long|E
)|lat_d|lat_m|S|long_d|long_m|E
)|lat_d|lat_m|lat_s|S|long_d|long_m|long_s|E
){{Maplink|frame=yes|type=point|coord={{coord|15|24|10|S|17|12|15|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|id=Q2327957|frame=yes|type=point}}
{{Maplink}}
Lua錯誤:維基數據上找不到的坐標。
{{Maplink/sandbox}}
Lua錯誤:維基數據上找不到的坐標。
{{Maplink|frame=yes|type=circle|radius=1000|coord={{coord|-31.95|115.85}}}}
{{Maplink}}
{{Maplink/sandbox}}
Multiple features
編輯Maplink
編輯{{Maplink|type2=data|type=data|from=MAX Light Rail (Perth).map|from2=Sandbox/Evad37/St Georges Terrace.map}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=point|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|31.8|S|115.8|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|id=Q1318331|type=line|type2=point|coord2={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=shape|id=Q3495894|type2=point|coord2={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=shape|id=Q3495894|type2=line|id2=Q1318331|type3=point|coord3={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||type=circle|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=line|type=circle|id=Q3495894|id2=Q1318331|radius=2000}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=line|id=Q1318331|type2=shape-inverse|id2=Q3495894|type3=point|coord3={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
Mapframe tag
編輯{{Maplink|type2=data|type=data|from=MAX Light Rail (Perth).map|frame=yes|from2=Sandbox/Evad37/St Georges Terrace.map}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|type=point|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|31.8|S|115.8|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|id=Q1318331|type=line|type2=point|coord2={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|type=shape|id=Q3495894|type2=point|coord2={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=line|type=shape|id=Q3495894|frame=yes|id2=Q1318331}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|type=shape|id=Q3495894|type2=line|id2=Q1318331|type3=point|coord3={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=point|type=shape-inverse|id=Q1174|zoom=7|id2=Q200663|frame-height=280|frame-lat=29.185|stroke-width=3|title2=Faridabad|plain=yes|frame=yes|frame-long=76.225|frame-width=250}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes|type=line|id=Q1318331|type2=shape-inverse|id2=Q3495894|type3=point|coord3={{coord|32|S|116|E}}}}
{{Maplink}}
{{Maplink/sandbox}}
Styles
編輯{{Maplink|zoom=9|type=line|stroke-width=3|frame=yes|stroke-color=#008888|id=Q100}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|zoom=9|type=shape|id=Q100|stroke-width=3|frame=yes|stroke-color=#008888|fill=#00ff00}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|zoom=9|type=shape-inverse|id=Q100|stroke-width=3|frame=yes|stroke-color=#00ffff|fill=#888888}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=point|marker-color=#888800|id=Q100|frame=yes|marker=star|zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=shape|id=Q100|stroke-width=3|stroke-opacity=0.4|zoom=9|fill-opacity=0.4|frame=yes|stroke-color=#008888|fill=#00ff00}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=shape-inverse|id=Q100|stroke-width=3|stroke-opacity=0.4|zoom=9|fill-opacity=0.4|frame=yes|stroke-color=#008888|fill=#00ff00}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|zoom=9|type=circle|radius=10000|id=Q100|stroke-width=3|frame=yes|stroke-color=#008888|fill=#00ff00}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|zoom=9|id=Q100|stroke-opacity=0.4|fill-opacity=0.4|type=circle|radius=10000|stroke-width=3|frame=yes|stroke-color=#008888|fill=#00ff00}}
{{Maplink}}
{{Maplink/sandbox}}
Circles
編輯{{Maplink|type=circle|radius=1000|edges=8|coord={{coord|-31.95|115.85}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=circle|radius=1000|edges=68|coord={{coord|-31.95|115.85}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=circle|radius_m=1110|coord={{coord|-31.95|115.85}}}}
{{Maplink}}
Lua錯誤:必須指定圓的半徑。
{{Maplink/sandbox}}
Lua錯誤:必須指定圓的半徑。
Geomasks
編輯{{Maplink|zoom=9|id=Q16567|stroke-width=2|frame-height=200|frame-align=center|title=Columbus|type=shape-inverse|plain=y|frame=yes|stroke-color=#808080|frame-width=135}}
{{Maplink}}
{{Maplink/sandbox}}
Multi switcher
編輯{{Maplink|type=point|id=Q100|plain=yes|frame=yes|zoom=SWITCH:5;8;11|switch=zoomed out; zoomed mid; zoomed in}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=line|stroke-width2=1|id=Q100|switch=country, state, city|type=point|frame-align=left|frame=yes|id2=SWITCH:Q578170, Q771, Q100|plain=yes}}
{{Maplink}}
{{Maplink/sandbox}}
Inside an infobox
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{Maplink|zoom=SWITCH:5;8;11|text=Captiony thingy|switch=zoomed out; zoomed mid; zoomed in|frame=yes|id=Q100|type=point}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=line|type=point|frame-align=left|id=Q100|switch=country, state, city|frame=yes|id2=SWITCH:Q578170, Q771, Q100|stroke-width2=1}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=point|id=Q100|frame-align=center|frame=yes|zoom=SWITCH:3,7,11|switch=zoomed out; zoomed mid; zoomed in}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type2=point|zoom=SWITCH:2,6,10|type1=shape-inverse|id=SWITCH:Q30, Q771, Q100|text=Foo [[bar]] baz|switch=demo #1, demo#2, demo#3|frame=yes|id2=Q100|frame-align=center}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |frame-align=center |switch=demo #1, demo#2, demo#3 |zoom=SWITCH:2,6,10 |type1=point |id1=Q100 |frame-coord=SWITCH:{{Coord|1|23|N|2|34|E}}###{{Coord|32|1|S|115|6|E}}###{{Coord|32|1|N|115|6|W}}}}
{{Maplink}}
{{Maplink/sandbox}}
Errors expected
編輯延伸內容
|
---|
No SWITCH: lists {{Maplink|type=point|id=Q100|plain=yes|frame=yes|zoom=5|switch=zoomed out; zoomed in}} {{Maplink}} Lua錯誤:至少有一個參數必須有一個SWITCH: list。 {{Maplink/sandbox}} Lua錯誤:至少有一個參數必須有一個SWITCH: list。 Not enough labels {{Maplink|type=point|id=Q100|plain=yes|frame=yes|zoom=SWITCH:5;8;11|switch=zoomed out; zoomed in}} {{Maplink}} Lua錯誤:發現3個switch值但只有2個label在 |switch=。 {{Maplink/sandbox}} Lua錯誤:發現3個switch值但只有2個label在 |switch=。 Only one label {{Maplink|type=point|id=Q100|plain=yes|frame=yes|zoom=SWITCH:5;8;11|switch=zoomed out}} {{Maplink}} Lua錯誤:發現只有一個label值在 |switch=。 {{Maplink/sandbox}} Lua錯誤:發現只有一個label值在 |switch=。 Only one value in SWITCH: list {{Maplink|type=point|id=Q100|plain=yes|frame=yes|zoom=SWITCH:5|switch=zoomed out, zoomed in}} {{Maplink}} Lua錯誤:發現只有一個switch值在 |zoom=。 {{Maplink/sandbox}} Lua錯誤:發現只有一個switch值在 |zoom=。 Differing numbers values in SWITCH: list {{Maplink|type=point|id=SWITCH:Q30, Q100|plain=yes|frame=yes|zoom=SWITCH:5;8;11|switch=zoomed out; zoomed in}} {{Maplink}} Lua錯誤:All SWITCH:列表必須有相同數量的值。 {{Maplink/sandbox}} Lua錯誤:All SWITCH:列表必須有相同數量的值。 |
Named coordinates test data
編輯Point | Coordinates (links to map & photo sources) |
---|---|
Dudley Port Junction | 52°31′19″N 2°02′36″W / 52.52204°N 2.04331°W |
Groveland Bridge (Tipton Road, A457) | 52°31′03″N 2°02′51″W / 52.51758°N 2.04760°W |
Tividale Aqueduct (Old BCN Main Line) | 52°30′59″N 2°02′54″W / 52.51640°N 2.04843°W |
Northern tunnel portal | 52°30′55″N 2°02′58″W / 52.51534°N 2.04948°W |
Aston Road air vent | 52°30′31″N 2°03′19″W / 52.50850°N 2.05518°W |
Regent Road air vent | 52°30′25″N 2°03′25″W / 52.50697°N 2.05708°W |
Approx. tunnel midpoint | 52°30′16″N 2°03′34″W / 52.50435°N 2.05932°W |
Named coordinates
編輯Southern tunnel portal | 52°29′36″N 2°04′09″W / 52.49335°N 2.06916°W |
Windmill End Junction | 52°29′30″N 2°04′13″W / 52.49157°N 2.07019°W |
{{Maplink|frame=yes|type=named|from=List of bridges in Perth, Western Australia}}
{{Maplink}}
Lua錯誤:Page 'List of bridges in Perth, Western Australia' not found。
{{Maplink/sandbox}}
Lua錯誤:Page 'List of bridges in Perth, Western Australia' not found。
{{Maplink|type2=shape-inverse|type=named|type3=line|frame=yes|id2=Q23124|id3=Q23124}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|type=named|from=#Named coordinates|marker=star|frame=yes|marker-color=#ff0000}}
{{Maplink}}
{{Maplink/sandbox}}
Overlays
編輯{{Maplink|frame=yes|plain=yes|type=point|id=Q100|overlay={{mapframe|frame=yes|plain=yes|frame-width=100|frame-height=100|type=shape|id=Q100|zoom=5}} }}
{{Maplink}}
{{Maplink/sandbox}}