Template:Infobox mapframe/testcases

From Jonesipedia
Revision as of 12:35, 28 April 2022 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

Shape feature

{{Infobox mapframe|
|id=Q100}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe|
|frame-lat=42.319|frame-long=-71.002|id=Q100}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe|
|id=Q100|shape=inverse}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe|
|id=Q100|shape=none}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Line feature

With OSM relation id on Wikidata

  • Marker not specified
{{Infobox mapframe|
|id=Q4681790}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
  • Marker is specified
{{Infobox mapframe|
|id=Q4681790|marker=triangle|marker-color=008800}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
  • Explicit |marker=none
{{Infobox mapframe|
|id=Q4681790|marker=none}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Without OSM relation id on Wikidata

{{Infobox mapframe|
|id=Q1939502}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Coordinates set to 'no value' on Wikidata

{{Infobox mapframe|
|id=Q2327957}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Locally specified coords instead of Wikidata

No Wikidata item

{{Infobox mapframe|coord={{Coord|-31.876|115.897}}}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
<mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe> <mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe>

wikidata=yes with no Wikidata item

{{Infobox mapframe|coord={{Coord|-31.876|115.897}}|wikidata=yes}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
<mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe> <mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe>

Overriding Wikidata item

{{Infobox mapframe|coord={{Coord|-31.876|115.897}}|id=Q1939502|marker=triangle}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
<mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"marker-color":"#5E74F3","title":"Infobox mapframe/testcases","marker-symbol":"triangle"}}</mapframe> <mapframe zoom="10" frameless="1" align="center" longitude="115.897" latitude="-31.876" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"marker-color":"#5E74F3","title":"Infobox mapframe/testcases","marker-symbol":"triangle"}}</mapframe>

Show OSM relations but use locally specified coords

{{Infobox mapframe|wikidata=yes|id=Q1939502|coord={{Coord|-31.876|115.897}}|marker=triangle}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q1939502"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q1939502"}, {"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"marker-color":"#5E74F3","title":"Infobox mapframe/testcases","marker-symbol":"triangle"}}

]</mapframe>

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q1939502"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q1939502"}, {"type":"Feature","geometry":{"coordinates":[115.897,-31.876],"type":"Point"},"properties":{"marker-color":"#5E74F3","title":"Infobox mapframe/testcases","marker-symbol":"triangle"}}

]</mapframe>

point=none (should show line/shape features)

{{Infobox mapframe|id=Q1939502|coord={{Coord|-31.876|115.897}}|point=none}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q1939502"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q1939502"}

]</mapframe>

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q1939502"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q1939502"}

]</mapframe>

coord parameter present but empty

{{Infobox mapframe|coord=|id=Q1939502|marker=triangle|wikidata=yes}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

No coords locally and none on Wikidata

{{Infobox mapframe|id=Q1}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Geomask

Find mask by relation

{{Infobox mapframe|geomask=P17|id=Q1297}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe|id=Q1297|geomask=P17|frame-coord={{Coord|39.8|N|98.3|W}}|zoom=2}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Mask Item specified

{{Infobox mapframe|geomask=Q1204|id=Q1297}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Custom zoom and frame-coord with a mask

{{Infobox mapframe|id=Q1297|geomask=Q1204|zoom=6|frame-coord={{Coord|42|-88}}}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Edersee Dam

{{Infobox mapframe|geomask=P17|id=Q3239281}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Q1950380, P131

{{Infobox mapframe|geomask=P131|id=Q1950380}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Q1950380, P17

{{Infobox mapframe|geomask=P17|id=Q1950380}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}


More tests

Basic usage

Point feature (Wikidata coordinates):

{{Infobox mapframe |id=Q7270550}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Line feature:

{{Infobox mapframe |id=Q1318331}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Shape feature:

{{Infobox mapframe |id=Q61}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Using specified coordinates instead of Wikidata

Point feature (with coordinates specified, no shape/line feature from Wikidata item):

{{infobox mapframe |id=Q45935 |coord={{coord|31|56|S|115|58|E}} }}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
<mapframe zoom="10" frameless="1" align="center" longitude="115.96666666667" latitude="-31.933333333333" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe> <mapframe zoom="10" frameless="1" align="center" longitude="115.96666666667" latitude="-31.933333333333" height="200" width="270">{"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}</mapframe>

Point feature (with coordinates specified, along with shape/line feature from Wikidata item):

{{infobox mapframe |id=Q45935 |wikidata=yes |coord={{coord|31|56|S|115|58|E}} }}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q45935"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q45935"}, {"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}

]</mapframe>

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"title":"Infobox mapframe/testcases","fill-opacity":0.5,"stroke":"#FF0000","stroke-width":3,"fill":"#606060"},"type":"ExternalData","service":"geoshape","ids":"Q45935"}, {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q45935"}, {"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}

]</mapframe>

Inverse shape

{{Infobox mapframe |id=Q61 |shape=inverse}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Shape off

{{infobox mapframe |id=Q45935 |wikidata=yes |shape=none |coord={{coord|31|56|S|115|58|E}} }}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q45935"}, {"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}

]</mapframe>

<mapframe zoom="10" align="center" frameless="1" height="200" width="270">[ {"properties":{"stroke-width":5,"stroke":"#FF0000","title":"Infobox mapframe/testcases"},"type":"ExternalData","service":"geoline","ids":"Q45935"}, {"type":"Feature","geometry":{"coordinates":[115.96666666666667,-31.933333333333334],"type":"Point"},"properties":{"title":"Infobox mapframe/testcases","marker-color":"#5E74F3"}}

]</mapframe>

Point off

{{Infobox mapframe |id=Q7270550 |point=none}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Point on

{{Infobox mapframe |id=Q61 |point=on}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Line off

{{Infobox mapframe |id=Q1939502 |line=none |point=on}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Opacity

{{Infobox mapframe |id=Q61 |shape-fill-opacity=0.2}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe |id=Q61 |shape=inverse |shape-fill-opacity=0.2}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}
{{Infobox mapframe|geomask=P17|id=Q3239281 |geomask-fill-opacity=0.8}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Switcher tests

Zooms

{{Infobox mapframe |id=Q4948020 |switcher=zooms}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Auto

{{Infobox mapframe |id=Q2224 |switcher=auto}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}

Geomasks

{{Infobox mapframe |id=Q4948020 |switcher=geomasks|geomask=Q30,Q100}}
Side by side comparison
{{Infobox mapframe}}{{Infobox mapframe/sandbox}}