Extension:Semantic Maps

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, using multiple mapping services. These include Google Maps, Open Layers and Yahoo Maps. Semantic Maps and Maps are based on Semantic Google Maps and Semantic Layers, and are meant to replace these extensions. For this extension to work, you need to have both Semantic MediaWiki and Maps installed.

Overview
Semantic Maps and Map provide a map interface to the Semantic MediaWiki Geographic coordinate property type, through the following features:

1. Display of coordinates. See the usage of Maps for more info.

2. Aggregation of coordinates. Each mapping service has it's own special output format, that can be used in Semantic MediaWiki queries, allowing a set of coordinate data stored on multiple pages to be displayed together on a single map.

3. Insertion of coordinates. Semantic Maps provides custom Semantic Forms input types. These input types display a map with a geocoder in a form to make the insertion (and editing) of coordinates easy for users.

Download and installation
Once you have downloaded the code, place the 'SemanticMaps' directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file after the lines that install Maps:

The inclusion of extensions should happen in this order: Semantic MediaWiki, Semantic Forms (if you use it), Semantic Maps. Maps should proceed Semantic Maps. See the installation instructions of Maps for info about the API keys.

Display multiple points
You can set a Semantic MediaWiki #ask query to display its results as a map, by setting "format=mapservice", in which 'mapservice' is the mapping service you want to use. You can use all of the available mapping services of Maps. See the Map formats list for the exact names of the formats. One of the properties queried and displayed must be of type 'Geographic coordinate' for this query to work; this property is what will determine the location of each point on the map. Clicking on each point will display a label holding the name of the page, along with any other queried information; clicking on the page name will bring the user to that page. The zoom level of the map will be the closest one possible that shows all the points.

Both maps that result from the following code will have markers on the same locations, but will use different mapping services. To recreate such a result, you simply make a category with the name Locations, which has a property 'Has coordinates', of type Geographic coordinate.

Map formats
This is a list of all result formats of Semantic Maps:
 * format=googlemap - Google Maps service.
 * format=openlayer - Yahoo Maps service.
 * format=yahoomap - Open Layers service.

Map properties
You can add seven additional map properties to the query, to change the appearance and usage of the resulting map. These parameters are in general identical to those of the parser functions to display a single point in Maps. Here you have a list of exceptions:

Here is an example of an #ask query that uses the 'googlemap' format:

Version
No version have been released so far. A stable release can be expected before the end of August 2009.

Bugs and feature requests
If you have bug reports or requests, please either send them to Jeroen De Dauw, jeroendedauw -at- gmail.com, and Yaron Koren, at yaron57 -at- gmail.com, or add them to the Talk page.