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.

Installation instructions
Make sure you have Semantic MediaWiki and Maps successfully installed before proceeding with the 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
Semantic provides multiple result formats. The result format for a certain query map can be set with the  parameter. The underneath list contains the available result formats.
 * - the default mapping service will be used.
 * - Google Maps service.
 * - Yahoo Maps service.
 * - Open Layers service.

Each service has it's own unique functionality. Click the service name above for an overview of these features. See the list below for the common parameters.

Map properties
You can add seven additional parameters to the query, to change the appearance and usage of the resulting map. This list contains only the common parameters, in other words, the parameters that can be used for every mapping service. For the specific parameters, see the result format.


 * - (display_point only) the coordinates to display a marker and also the centre of the map - you can set the default
 * - (display_address only) the address to display a marker and also the centre of the map
 * - the width of the map, in pixels - you can set the default
 * - the height of the map, in pixels - you can set the default
 * - the zoom level of the map - you can set the default
 * - the coordinates of the map's centre

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

Settings
Semantic Maps allows you to configure a variety of settings, and so affect how the extension works. All settings are located in Maps_Settings.php, in the root of the Maps extension. Currently, Semantic Maps does not add any settings to the ones of Maps. Please refer to the Maps Settings for an overview of these settings.

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.

Who's using Semantic Maps?
Are you using Semantic Maps? Then be sure to add your wiki to the top of this list, and feel free to link your favourite Semantic Maps-using articles!


 * BN's dev wiki Development wiki with some demo data