Semantic Maps
From Wiki of Jeroen De Dauw
This page contains examples of the usage of the Semantic Maps MediaWiki extension.
Semantic Maps is an extension that adds semantic capabilities to the Maps extension, and therefore provides the ability to add, view and edit coordinate data stored through the Semantic MediaWiki extension.
| Semantic Maps: |
Examples • Sandbox • Google Maps • Yahoo! Maps • OpenLayers • OpenStreetMap • Discussion • Documentation |
Contents |
Semantic Maps examples
Basic examples
Use of the map format. The default mapping service will be used, in this case Google Maps.
{{
#ask:
[[Category:Locations]]
| ?Has coordinates
| format=map
}}
Use of the map format and settings the map width and height.
{{
#ask:
[[Category:Locations]]
| ?Has coordinates
| format=googlemap
| width=800
| height=500
}}
Queering additional semantic properties
Query showing all cities located in Germany on a map with their population and surface area as pop-up contents of the markers.
{{#ask: [[Category:City]] [[located in::Germany]]
| ?coordinates
| ?population
| ?area#km² = Size in km²
| format=map
}}
Query showing the locations off all Events on this wiki together with a load of information about these events. The query has a limit of 42, meaning at most 42 results will be shown on the map. The format is set to googlemaps, ensuring a Google Maps map, and the map type is set to physical.
{{#ask: [[Category:Events]]
| ?Has coordinates
| ?Has presenter=Presenters
| ?Has start date=Start date
| ?Has end date=End date
| ?Has address=Address
| ?Has city=City
| ?Has country=Country
| ?Has attendee=Attendees
| limit=42
| format=googlemaps
| type=physical
| icon=Green_marker.png
}}
Use of templates
Adding a link to maps.google.com by using a template. See template.
{{#ask: [[Category:City]]
| ?coordinates
| format=map
| template=Google Maps Link
}}
Custom formatting of the queried properties using the template and showtitle parameters. See used template.
{{#ask: [[Category:City]]
| ?coordinates
| ?population
| ?area#km²
| format=map
| template=City Popup
| showtitle=off
| icon=Blue_marker.png
}}
Compound queries
See also
| Semantic Maps: |
Examples • Sandbox • Google Maps • Yahoo! Maps • OpenLayers • OpenStreetMap • Discussion • Documentation |
| Maps: |
Examples • Sandbox • Google Maps • Yahoo! Maps • OpenLayers • OpenStreetMap • Discussion • Documentation |