Template:Maplink2/testcases
![]() | ここは、Template:Maplink2のサンドボックス・サブページに対応したテンプレート・テストケースです。 右のボタンをクリックするとテストケースが更新されます。 更なる情報とオプション このページに複雑なテンプレートの使用例を多く記述した場合、MediaWikiの制限によりページの終端部周辺で誤動作を起こす可能性があります。この誤動作が発生した場合、発生したページのソースに追加された「NewPP limit report」というコメントを参照してください。
また、特別:テンプレートを展開でテンプレートの使用結果を実験することも出来ます。 このページを表示する外装を変更する: |
Maplink tag
[編集]Simple geoline |
---|
{{Maplink2|id=Q2108|type=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple geoshape |
---|
{{Maplink2|id=Q797|type=shape}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple geomask |
---|
{{Maplink2|id=Q797|type=shape-inverse}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple Data: page |
---|
{{Maplink2||from=Sandbox/Evad37/St Georges Terrace.map|type=data}} {{Maplink2}} {{Maplink2/sandbox}} |
title display |
---|
{{Maplink2|display=title|id=Q2108|type=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (supplied coordinates) |
---|
{{Maplink2|type=point|coord={{coord|-15.4|17.2}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (Wikidata coordinates) |
---|
{{Maplink2|id=Q797|type=point}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple circle (supplied coordinates) |
---|
{{Maplink2|type=circle|radius=1000|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple circle (wikidata coordinates) |
---|
{{Maplink2|id=Q60|radius=5000|type=circle}} {{Maplink2}} {{Maplink2/sandbox}} |
Mapframe tag
[編集]Simple geoline |
---|
{{Maplink2|frame=yes|id=Q2108|type=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple geoline with coordinates on Wikidata |
---|
{{Maplink2|frame=yes|id=Q515443|type=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Frame latitude & longitude (simple geoline) |
---|
{{Maplink2|frame=yes|frame-lat=42.4934|frame-long=-82.9166|id=Q2108|type=line|zoom=8}} {{Maplink2}} {{Maplink2/sandbox}} |
Frame latitude & longitude within {{Coord}} template (simple geoline) |
---|
{{Maplink2|frame=yes|frame-coordinates={{coord|41.9|N|82.7|W}}|zoom=7|type=line|id=Q2108}} {{Maplink2}} {{Maplink2/sandbox}} |
Frameless (simple geoline) |
---|
{{Maplink2|frame=yes|frame-lat=42.4934|frame-long=-82.9166|id=Q2108|plain=yes|type=line|zoom=8}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple geoshape |
---|
{{Maplink2|frame=yes|id=Q797|type=shape}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple geomask |
---|
{{Maplink2|frame=yes|id=Q797|type=shape-inverse}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple Data: page |
---|
{{Maplink2||frame=yes|from=Sandbox/Evad37/St Georges Terrace.map|type=data}} {{Maplink2}} {{Maplink2/sandbox}} |
Raw data |
---|
{{Maplink2||frame=yes|type=data|raw={{Wikipedia:Map data/Wikipedia KML/Interstate 45}}}} {{Maplink2}} <mapframe>: 次のJSONをパースできません: 構文エラー
{{Maplink2/sandbox}} <mapframe>: 次のJSONをパースできません: 構文エラー
|
Simple point (supplied coordinates, |lat|long ) |
---|
{{Maplink2|frame=yes|type=point|coord={{coord|-15.4|17.2}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (supplied coordinates, |lat|S|long|E ) |
---|
{{Maplink2|frame=yes|type=point|coord={{coord|15.4|S|17.2|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (supplied coordinates, |lat_d|lat_m|S|long_d|long_m|E ) |
---|
{{Maplink2|frame=yes|type=point|coord={{coord|15|24|S|17|12|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (supplied coordinates, |lat_d|lat_m|lat_s|S|long_d|long_m|long_s|E ) |
---|
{{Maplink2|frame=yes|type=point|coord={{coord|15|24|10|S|17|12|15|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple point (Wikidata coordinates) |
---|
{{Maplink2|frame=yes|id=Q797|type=point}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple circle (supplied coordinates) |
---|
{{Maplink2|frame=yes|type=circle|radius=1000|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Simple circle (wikidata coordinates) |
---|
{{Maplink2|frame=yes|id=Q60|radius=5000|type=circle}} {{Maplink2}} {{Maplink2/sandbox}} |
Multiple features
[編集]Maplink
[編集]2 lines |
---|
{{Maplink2|id=Q1318331|id2=Q1544264|type=line|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
2 shapes |
---|
{{Maplink2|id=Q100|id2=Q1384|type=shape|type2=shape}} {{Maplink2}} {{Maplink2/sandbox}} |
2 .map pages |
---|
{{Maplink2|from=MAX Light Rail (Perth).map|from2=Sandbox/Evad37/St Georges Terrace.map|type=data|type2=data}} {{Maplink2}} {{Maplink2/sandbox}} |
2 points (manually specified) |
---|
{{Maplink2|type=point|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|31.8|S|115.8|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Line + point |
---|
{{Maplink2|id=Q1318331|type=line|type2=point|coord2={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + point |
---|
{{Maplink2|type=shape|id=Q3495894|type2=point|coord2={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + line |
---|
{{Maplink2|id=Q3495894|id2=Q1318331|type=shape|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + line + point |
---|
{{Maplink2|type=shape|id=Q3495894|type2=line|id2=Q1318331|type3=point|coord3={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Circle + point |
---|
{{Maplink2||type=circle|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Circle + line |
---|
{{Maplink2|id=Q3495894|id2=Q1318331|radius=2000|type=circle|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Line + Shape-inverse + point |
---|
{{Maplink2|type=line|id=Q1318331|type2=shape-inverse|id2=Q3495894|type3=point|coord3={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Mapframe tag
[編集]2 lines |
---|
{{Maplink2|frame=yes|id=Q1318331|id2=Q1544264|type=line|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
2 shapes |
---|
{{Maplink2|frame=yes|id=Q100|id2=Q1384|type=shape|type2=shape}} {{Maplink2}} {{Maplink2/sandbox}} |
2 .map pages |
---|
{{Maplink2|frame=yes|from=MAX Light Rail (Perth).map|from2=Sandbox/Evad37/St Georges Terrace.map|type=data|type2=data}} {{Maplink2}} {{Maplink2/sandbox}} |
2 points (manually specified) |
---|
{{Maplink2|frame=yes|type=point|coord={{coord|32|S|116|E}}|type2=point|coord2={{coord|31.8|S|115.8|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Line + point |
---|
{{Maplink2|frame=yes|id=Q1318331|type=line|type2=point|coord2={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + point |
---|
{{Maplink2|frame=yes|type=shape|id=Q3495894|type2=point|coord2={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + line |
---|
{{Maplink2|frame=yes|id=Q3495894|id2=Q1318331|type=shape|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Shape + line + point |
---|
{{Maplink2|frame=yes|type=shape|id=Q3495894|type2=line|id2=Q1318331|type3=point|coord3={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Point within a shape, with various optional/style parameters |
---|
{{Maplink2|frame=yes|frame-height=280|frame-lat=29.185|frame-long=76.225|frame-width=250|id=Q1174|id2=Q200663|plain=yes|stroke-width=3|title2=Faridabad|type=shape-inverse|type2=point|zoom=7}} {{Maplink2}} {{Maplink2/sandbox}} |
Line + Shape-inverse + point |
---|
{{Maplink2|frame=yes|type=line|id=Q1318331|type2=shape-inverse|id2=Q3495894|type3=point|coord3={{coord|32|S|116|E}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Styles
[編集]Stroke width and stroke colour for line |
---|
{{Maplink2|frame=yes|id=Q100|stroke-color=#008888|stroke-width=3|type=line|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke width, stroke colour, and fill colour for shape |
---|
{{Maplink2|fill=#00ff00|frame=yes|id=Q100|stroke-color=#008888|stroke-width=3|type=shape|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke width, stroke colour, and fill colour for shape-inverse |
---|
{{Maplink2|fill=#888888|frame=yes|id=Q100|stroke-color=#00ffff|stroke-width=3|type=shape-inverse|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Marker symbol and colour for point |
---|
{{Maplink2|frame=yes|id=Q100|marker=star|marker-color=#888800|type=point|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke-opacity and fill-opacity for shape |
---|
{{Maplink2|fill=#00ff00|fill-opacity=0.4|frame=yes|id=Q100|stroke-color=#008888|stroke-opacity=0.4|stroke-width=3|type=shape|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke-opacity and fill-opacity for shape-inverse |
---|
{{Maplink2|fill=#00ff00|fill-opacity=0.4|frame=yes|id=Q100|stroke-color=#008888|stroke-opacity=0.4|stroke-width=3|type=shape-inverse|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke width, stroke colour, and fill colour for circle |
---|
{{Maplink2|fill=#00ff00|frame=yes|id=Q100|radius=10000|stroke-color=#008888|stroke-width=3|type=circle|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Stroke-opacity and fill-opacity for circle |
---|
{{Maplink2|fill=#00ff00|fill-opacity=0.4|frame=yes|id=Q100|radius=10000|stroke-color=#008888|stroke-opacity=0.4|stroke-width=3|type=circle|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Circles
[編集]Radius in metres |
---|
{{Maplink2|type=circle|radius_m=1110|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Radius in kilometres |
---|
{{Maplink2|type=circle|radius_km=10|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Radius in miles |
---|
{{Maplink2|type=circle|radius_mi=10|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Radius in feet |
---|
{{Maplink2|type=circle|radius_ft=200|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Fewer edges |
---|
{{Maplink2|type=circle|radius=1000|edges=8|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Extra edges |
---|
{{Maplink2|type=circle|radius=1000|edges=68|coord={{coord|-31.95|115.85}}}} {{Maplink2}} {{Maplink2/sandbox}} |
No radius specified (error expected) |
---|
{{Maplink2|type=circle|radius_m=1110|coord={{coord|-31.95|115.85}}}} {{Maplink2}} Lua エラー: 円の半径が指定されていません {{Maplink2/sandbox}} Lua エラー: 円の半径が指定されていません |
Geomasks
[編集]Geomask with hole |
---|
{{Maplink2|frame=yes|id=Q7998839|type=shape-inverse}} {{Maplink2}} {{Maplink2/sandbox}} |
Geomask with holes and stroke styles |
---|
{{Maplink2|frame=yes|frame-align=center|frame-height=200|frame-width=135|id=Q16567|plain=y|stroke-color=#808080|stroke-width=2|title=Columbus|type=shape-inverse|zoom=9}} {{Maplink2}} {{Maplink2/sandbox}} |
Multi switcher
[編集]Multiple zoom levels (specifying numbers) |
---|
{{Maplink2|frame=yes|id=Q100|plain=yes|switch=zoomed out; zoomed mid; zoomed in|type=point|zoom=SWITCH:5;8;11}} {{Maplink2}} {{Maplink2/sandbox}} |
Multiple geolines (shape outlines), which are auto-zoomed |
---|
{{Maplink2|frame=yes|frame-align=left|id=Q100|id2=SWITCH:Q578170, Q771, Q100|plain=yes|stroke-width2=1|switch=country, state, city|type=point|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Inside an infobox
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Framed, align right |
---|
{{Maplink2|frame=yes|id=Q100|switch=zoomed out; zoomed mid; zoomed in|text=Captiony thingy|type=point|zoom=SWITCH:5;8;11}} {{Maplink2}} {{Maplink2/sandbox}} |
Framed, align left, no text |
---|
{{Maplink2|frame=yes|frame-align=left|id=Q100|id2=SWITCH:Q578170, Q771, Q100|stroke-width2=1|switch=country, state, city|type=point|type2=line}} {{Maplink2}} {{Maplink2/sandbox}} |
Framed, align center |
---|
{{Maplink2|frame=yes|frame-align=center|id=Q100|switch=zoomed out; zoomed mid; zoomed in|type=point|zoom=SWITCH:3,7,11}} {{Maplink2}} {{Maplink2/sandbox}} |
Multiple switch parameters (zoom and geomask) |
---|
{{Maplink2|frame=yes|frame-align=center|id=SWITCH:Q30, Q771, Q100|id2=Q100|switch=demo #1, demo#2, demo#3|text=Foo [[bar]] baz|type1=shape-inverse|type2=point|zoom=SWITCH:2,6,10}} {{Maplink2}} Foo bar baz {{Maplink2/sandbox}} Foo bar baz |
Multiple switch parameters (zoom and frame-coord) |
---|
{{Maplink2|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}}}} {{Maplink2}} {{Maplink2/sandbox}} |
Errors expected
[編集]Extended content
| ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Named coordinates test data
[編集]Point | Coordinates (links to map & photo sources) |
---|---|
Dudley Port Junction | 北緯52度31分19秒 西経2度02分36秒 / 北緯52.52204度 西経2.04331度 |
Groveland Bridge (Tipton Road, A457) | 北緯52度31分03秒 西経2度02分51秒 / 北緯52.51758度 西経2.04760度 |
Tividale Aqueduct (Old BCN Main Line) | 北緯52度30分59秒 西経2度02分54秒 / 北緯52.51640度 西経2.04843度 |
Northern tunnel portal | 北緯52度30分55秒 西経2度02分58秒 / 北緯52.51534度 西経2.04948度 |
Aston Road air vent | 北緯52度30分31秒 西経2度03分19秒 / 北緯52.50850度 西経2.05518度 |
Regent Road air vent | 北緯52度30分25秒 西経2度03分25秒 / 北緯52.50697度 西経2.05708度 |
Approx. tunnel midpoint | 北緯52度30分16秒 西経2度03分34秒 / 北緯52.50435度 西経2.05932度 |
Named coordinates
[編集]Southern tunnel portal | 北緯52度29分36秒 西経2度04分09秒 / 北緯52.49335度 西経2.06916度 |
Windmill End Junction | 北緯52度29分30秒 西経2度04分13秒 / 北緯52.49157度 西経2.07019度 |
All coordinates on page |
---|
{{Maplink2|frame=yes|type=named}} {{Maplink2}} Lua エラー モジュール:Mapframe 内、336 行目: attempt to perform arithmetic on local 'lat_d' (a nil value) {{Maplink2/sandbox}} |
All coordinates on page in a section |
---|
{{Maplink2|frame=yes|from=#Named coordinates|type=named}} {{Maplink2}} Lua エラー モジュール:Mapframe 内、336 行目: attempt to perform arithmetic on local 'lat_d' (a nil value) {{Maplink2/sandbox}} |
All coordinates on another page |
---|
{{Maplink2|frame=yes|from=List of bridges in Perth, Western Australia|type=named}} {{Maplink2}} Lua エラー: Page 'List of bridges in Perth, Western Australia' not found {{Maplink2/sandbox}} Lua エラー: Page 'List of bridges in Perth, Western Australia' not found |
All coordinates on page plus a geoshape |
---|
{{Maplink2|frame=yes|id2=Q23124|id3=Q23124|type=named|type2=shape-inverse|type3=line}} {{Maplink2}} Lua エラー モジュール:Mapframe 内、336 行目: attempt to perform arithmetic on local 'lat_d' (a nil value) {{Maplink2/sandbox}} |
With style params |
---|
{{Maplink2|frame=yes|from=#Named coordinates|marker=star|marker-color=#ff0000|type=named}} {{Maplink2}} Lua エラー モジュール:Mapframe 内、336 行目: attempt to perform arithmetic on local 'lat_d' (a nil value) {{Maplink2/sandbox}} |
Overlays
[編集]Simple overlay |
---|
{{Maplink2|frame=yes|id=Q100|overlay= {{Maplink2}} {{Maplink2/sandbox}} |