Semantic Maps examples/Compound queries

From semantic-mediawiki.org
< Category:Semantic Maps examples
Semantic Maps examplesSemantic Maps examples/Compound queries

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.

Green marker.png indicate countries.

Blue marker.png represent continents.

Loading map...

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...