These examples make use of the Extension "Semantic Compound Queries" extension as well as the Extension "Maps" extension.
Locations by type[edit]
This map indicates locations of different types with different markers.
{{
#compound_query:
[[Category:Locations]]
<q>
[[Has location type::City]]
OR
[[Has location type::Local place]]
</q>
; ?Has coordinates
; ?Located in
|
[[Category:Locations]]
[[Has location type::Country]]
; ?Has coordinates
; ?Located in
; icon=Green marker.png
|
[[Category:Locations]]
[[Has location type::Continent]]
; ?Has coordinates
; ?Located in
; icon=Blue marker.png
| format=map
| height=400
}}
Red markers pinpoint cities and local places.
indicate countries.
represent continents.
Loading map...
{"format":"leaflet","minzoom":false,"maxzoom":false,"limit":50,"offset":0,"link":"all","sort":[""],"order":[],"headers":"show","mainlabel":"","intro":"","outro":"","searchlabel":"... further results","default":"","import-annotation":false,"width":"auto","height":"400px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"zoom":false,"defzoom":14,"layers":["OpenStreetMap"],"image layers":[],"overlays":[],"resizable":false,"fullscreen":false,"scrollwheelzoom":true,"cluster":true,"clustermaxzoom":20,"clusterzoomonclick":true,"clustermaxradius":80,"clusterspiderfy":true,"geojson":"","clicktarget":"","showtitle":true,"hidenamespace":false,"template":"","userparam":"","activeicon":"","pagelabel":false,"ajaxcoordproperty":"","ajaxquery":"","locations":[{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Asia\" title=\"Asia\"\u003EAsia\u003C/a\u003E\u003C/b\u003E","title":"Asia","link":"","lat":34.04786,"lon":100.61966,"icon":"/w/images/6/6f/Blue_marker.png"},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Belgium\" title=\"Belgium\"\u003EBelgium\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Europe\" title=\"Europe\"\u003EEurope\u003C/a\u003E","title":"Belgium","link":"","lat":50.503887,"lon":4.469936,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Brussels\" title=\"Brussels\"\u003EBrussels\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Belgium\" title=\"Belgium\"\u003EBelgium\u003C/a\u003E","title":"Brussels","link":"","lat":50.8503396,"lon":4.3517103,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Coasting\" title=\"Coasting\"\u003ECoasting\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/w/index.php?title=Nettuno\u0026amp;action=edit\u0026amp;redlink=1\" class=\"new\" title=\"Nettuno (page does not exist)\"\u003ENettuno\u003C/a\u003E","title":"Coasting","link":"","lat":41.46141,"lon":12.66777,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Externsteine\" title=\"Externsteine\"\u003EExternsteine\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Demo:Germany\" title=\"Demo:Germany\"\u003EGermany\u003C/a\u003E","title":"Externsteine","link":"","lat":51.867863,"lon":8.9180267,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Gent\" title=\"Gent\"\u003EGent\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Belgium\" title=\"Belgium\"\u003EBelgium\u003C/a\u003E","title":"Gent","link":"","lat":51.053468,"lon":3.73038,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Hamburg\" title=\"Hamburg\"\u003EHamburg\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Demo:Germany\" title=\"Demo:Germany\"\u003EGermany\u003C/a\u003E","title":"Hamburg","link":"","lat":53.5510846,"lon":9.9936818,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Khabarovsk\" title=\"Khabarovsk\"\u003EKhabarovsk\u003C/a\u003E\u003C/b\u003E","title":"Khabarovsk","link":"","lat":48.485637,"lon":135.0795875,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Netherlands\" title=\"Netherlands\"\u003ENetherlands\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Europe\" title=\"Europe\"\u003EEurope\u003C/a\u003E","title":"Netherlands","link":"","lat":52.160454557747,"lon":5.625,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Norway\" title=\"Norway\"\u003ENorway\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Europe\" title=\"Europe\"\u003EEurope\u003C/a\u003E","title":"Norway","link":"","lat":60.472024,"lon":8.468946,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Portugal\" title=\"Portugal\"\u003EPortugal\u003C/a\u003E\u003C/b\u003E","title":"Portugal","link":"","lat":39.567870063777,"lon":-8.81103515625,"icon":"/w/images/c/ce/Green_marker.png"}],"imageLayers":[]}
Cities and places by country[edit]
This map shows everything in Belgium (red), Germany (green) and The Netherlands (blue), and assigns different Markers based on country.
{{
#compound_query:
[[Category:Locations]]
<q>
[[Located in::Belgium]]
OR
[[Located in.Located in::Belgium]]
</q>
; ?Has coordinates
;?Located in
|
[[Category:Locations]]
<q>
[[Located in::Germany]]
OR
[[Located in.Located in::Germany]]
</q>
; ?Has coordinates
; ?Located in
; icon=Green marker.png
|
[[Category:Locations]]
<q>
[[Located in::The Netherlands]]
OR
[[Located in.Located in::The Netherlands]]
</q>
; ?Has coordinates
; ?Located in
; icon=Blue marker.png
| format=leaflet
| height=400
}}
Loading map...
{"format":"leaflet","minzoom":false,"maxzoom":false,"limit":50,"offset":0,"link":"all","sort":[""],"order":[],"headers":"show","mainlabel":"","intro":"","outro":"","searchlabel":"... further results","default":"","import-annotation":false,"width":"auto","height":"400px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"zoom":false,"defzoom":14,"layers":["OpenStreetMap"],"image layers":[],"overlays":[],"resizable":false,"fullscreen":false,"scrollwheelzoom":true,"cluster":false,"clustermaxzoom":20,"clusterzoomonclick":true,"clustermaxradius":80,"clusterspiderfy":true,"geojson":"","clicktarget":"","showtitle":true,"hidenamespace":false,"template":"","userparam":"","activeicon":"","pagelabel":false,"ajaxcoordproperty":"","ajaxquery":"","locations":[{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Brussels\" title=\"Brussels\"\u003EBrussels\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Belgium\" title=\"Belgium\"\u003EBelgium\u003C/a\u003E","title":"Brussels","link":"","lat":50.8503396,"lon":4.3517103,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Externsteine\" title=\"Externsteine\"\u003EExternsteine\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Demo:Germany\" title=\"Demo:Germany\"\u003EGermany\u003C/a\u003E","title":"Externsteine","link":"","lat":51.867863,"lon":8.9180267,"icon":"/w/images/c/ce/Green_marker.png"},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Gent\" title=\"Gent\"\u003EGent\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Belgium\" title=\"Belgium\"\u003EBelgium\u003C/a\u003E","title":"Gent","link":"","lat":51.053468,"lon":3.73038,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Hamburg\" title=\"Hamburg\"\u003EHamburg\u003C/a\u003E\u003C/b\u003E\u003Chr /\u003E\u003Ca href=\"/wiki/Property:Located_in\" title=\"Property:Located in\"\u003ELocated in\u003C/a\u003E: \u003Ca href=\"/wiki/Demo:Germany\" title=\"Demo:Germany\"\u003EGermany\u003C/a\u003E","title":"Hamburg","link":"","lat":53.5510846,"lon":9.9936818,"icon":"/w/images/c/ce/Green_marker.png"}],"imageLayers":[]}