This is the template test cases page for the sandbox of Template:Maplink. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Maplink tag
editMapframe tag
edit{{Maplink|frame=yes |frame-lat=42.4934 |frame-long=-82.9166 |id=Q2108 |type=line |zoom=8}}
{{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|frame=yes |frame-lat=42.4934 |frame-long=-82.9166 |id=Q2108 |plain=yes |type=line |zoom=8}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||frame=yes |from=Sandbox/Evad37/St Georges Terrace.map |type=data}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||frame=yes|type=data|raw={{Wikipedia:Map data/Wikipedia KML/Interstate 45}}}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink||frame=yes|type=data|frame-width=600|frame-height=400|frame-lat=52|frame-long=-110|zoom=3|raw={ "type": "ExternalData", "service": "geoshape", "query": " SELECT ?id ?head (SAMPLE(?img) as ?img_) (min(?partyId) as ?party) (if(?party = '0', '#800000', if(?party = '1', '#000080', '#008000')) as ?fill) (concat('[[', substr(str(?link),31,500), '{{!}}', ?headLabel, ']]') as ?title) (concat(?stateLabel, '\\n', '[[File:', substr(str(?img_), 52, 500), '{{!}}200px]]') as ?description) WHERE { ?id wdt:P31 wd:Q35657 . ?id wdt:P6 ?head . ?head wdt:P102 ?party . BIND(if(?party = wd:Q29468, '0', if(?party = wd:Q29552, '1', '2')) as ?partyId) SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' . ?head rdfs:label ?headLabel . ?id rdfs:label ?stateLabel . } OPTIONAL { ?head wdt:P18 ?img . } ?link schema:about ?head . ?link schema:isPartOf <https://en.wikipedia.org/> . } GROUP BY ?id ?head ?headLabel ?link ?stateLabel "} }}
{{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|frame=yes |id=Q2327957 |type=point}}
{{Maplink}}
Lua error: Coordinates not found on Wikidata.
{{Maplink/sandbox}}
Lua error: Coordinates not found on Wikidata.
{{Maplink|frame=yes|type=circle|radius=1000|coord={{coord|-31.95|115.85}}}}
{{Maplink}}
{{Maplink/sandbox}}
Multiple features
editMaplink
edit{{Maplink|from=MAX Light Rail (Perth).map |from2=Sandbox/Evad37/St Georges Terrace.map |type=data |type2=data}}
{{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|id=Q3495894 |id2=Q1318331 |radius=2000 |type=circle |type2=line}}
{{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
edit{{Maplink|frame=yes |id=Q1318331 |id2=Q1544264 |type=line |type2=line}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |from=MAX Light Rail (Perth).map |from2=Sandbox/Evad37/St Georges Terrace.map |type=data |type2=data}}
{{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|frame=yes |id=Q3495894 |id2=Q1318331 |type=shape |type2=line}}
{{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|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}}
{{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
edit{{Maplink|frame=yes |id=Q100 |stroke-color=#008888 |stroke-width=3 |type=line |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|fill=#00ff00 |frame=yes |id=Q100 |stroke-color=#008888 |stroke-width=3 |type=shape |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|fill=#888888 |frame=yes |id=Q100 |stroke-color=#00ffff |stroke-width=3 |type=shape-inverse |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |id=Q100 |marker=star |marker-color=#888800 |type=point |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|fill=#00ff00 |fill-opacity=0.4 |frame=yes |id=Q100 |stroke-color=#008888 |stroke-opacity=0.4 |stroke-width=3 |type=shape |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|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}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|fill=#00ff00 |frame=yes |id=Q100 |radius=10000 |stroke-color=#008888 |stroke-width=3 |type=circle |zoom=9}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|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}}
{{Maplink}}
{{Maplink/sandbox}}
Circles
edit{{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 error: Circle radius must be specified.
{{Maplink/sandbox}}
Lua error: Circle radius must be specified.
Geomasks
edit{{Maplink|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}}
{{Maplink}}
{{Maplink/sandbox}}
Multi switcher
edit{{Maplink|frame=yes |id=Q100 |plain=yes |switch=zoomed out; zoomed mid; zoomed in |type=point |zoom=SWITCH:5;8;11}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|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}}
{{Maplink}}
{{Maplink/sandbox}}
Inside an infobox
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{Maplink|frame=yes |id=Q100 |switch=zoomed out; zoomed mid; zoomed in |text=Captiony thingy |type=point |zoom=SWITCH:5;8;11}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |frame-align=left |id=Q100 |id2=SWITCH:Q578170, Q771, Q100 |stroke-width2=1 |switch=country, state, city |type=point |type2=line}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |frame-align=center |id=Q100 |switch=zoomed out; zoomed mid; zoomed in |type=point |zoom=SWITCH:3,7,11}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|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}}
{{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
editExtended content
|
---|
No SWITCH: lists {{Maplink|frame=yes |id=Q100 |plain=yes |switch=zoomed out; zoomed in |type=point |zoom=5}} {{Maplink}} Lua error: At least one parameter must have a SWITCH: list. {{Maplink/sandbox}} Lua error: At least one parameter must have a SWITCH: list. Not enough labels {{Maplink|frame=yes |id=Q100 |plain=yes |switch=zoomed out; zoomed in |type=point |zoom=SWITCH:5;8;11}} {{Maplink}} Lua error: Found 3 switch values but only 2 labels in |switch=. {{Maplink/sandbox}} Lua error: Found 3 switch values but only 2 labels in |switch=. Only one label {{Maplink|frame=yes |id=Q100 |plain=yes |switch=zoomed out |type=point |zoom=SWITCH:5;8;11}} {{Maplink}} Lua error: Found only one label in |switch=. {{Maplink/sandbox}} Lua error: Found only one label in |switch=. Only one value in SWITCH: list {{Maplink|frame=yes |id=Q100 |plain=yes |switch=zoomed out, zoomed in |type=point |zoom=SWITCH:5}} {{Maplink}} Lua error: Found only one switch value in |zoom=. {{Maplink/sandbox}} Lua error: Found only one switch value in |zoom=. Differing numbers values in SWITCH: list {{Maplink|frame=yes |id=SWITCH:Q30, Q100 |plain=yes |switch=zoomed out; zoomed in |type=point |zoom=SWITCH:5;8;11}} {{Maplink}} Lua error: All SWITCH: lists must have the same number of values. {{Maplink/sandbox}} Lua error: All SWITCH: lists must have the same number of values. |
Named coordinates test data
editPoint | 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
editSouthern 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 |from=List of bridges in Perth, Western Australia |type=named}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |id2=Q23124 |id3=Q23124 |type=named |type2=shape-inverse |type3=line}}
{{Maplink}}
{{Maplink/sandbox}}
{{Maplink|frame=yes |from=#Named coordinates |marker=star |marker-color=#ff0000 |type=named}}
{{Maplink}}
{{Maplink/sandbox}}
Overlays
edit{{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}}