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. Examples of how to use Semantic Maps can be found here.

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.

Downloads

 * SemanticMaps0.1.zip 22.1 KB
 * SemanticMaps0.1.rar 18.46 KB
 * MapsAndSemanticMaps0.1.zip 1.04 MB
 * MapsAndSemanticMaps0.1.rar 848.87 KB

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.

Usage


If you are new to both Maps and Semantic Maps, it is highly recommended you read how to use Maps first.

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. Demo with the example.

Map formats
Semantic Maps adds multiple result formats to the ones made available by Semantic MediaWiki. The result format for a certain query map can be set with the  parameter in your #ask query. The underneath list contains the available result formats.
 * - the default mapping service will be used.
 * - Google Maps service. View example demo's.
 * - Yahoo Maps service. View example demo's.
 * - Open Layers service. View example demo's.

Some examples:

Each service has it's own unique functionality. Click the service name above for an overview of these features. See the map properties 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.

To make it really easy for you, Semantic Maps uses the same names as Maps (see Map's map properties), for both the result formats and form inputs. There are however some differences, as listed below:


 * or  - the coordinates of the map's centre. When not provided in a query, the map will centre itself to show all points.
 * - When not provided in a query, this will default to the maximal zoom that allows all points to be displayed.

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

Querying non-coordinate data


Semantic Maps supports the display of queried non-coordinate data. All queried properties that are not coordinates will be displayed in a pop-up balloon that will appear when clicking the marker representing the location of their corresponding coordinates. If there is a page associated with one of the non-coordinate values, the value will be linked to it.

Form Inputs


Semantic Maps provides multiple form inputs. Form inputs are hooks for Semantic Forms. Every mapping service has it's own form input. The form input type is determined with the  parameter.
 * - the default mapping service will be used.
 * - Google Maps service.
 * - Yahoo Maps service.
 * - OpenLayers service.

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

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, and instructions of how to modify them.

Version
Semantic Maps is currently at version 0.1, the first public release. It should still be considered beta, since issues are to be expected. However, it has been tested quite thoroughly, and should not cause any big problems. An update to this version can be expected within a few weeks, adding more functionality, fixing bugs and improving the overall extension structure.

Planned features
Curious about the upcoming features in the next release? The future work page contains on overview of the planned features, and the proposals that have been turned down.

Changelog
Version 0.1 (2009-07-21)


 * Initial release, featuring both result formats and form inputs for Google Maps (+ Google Earth), Yahoo! Maps and OpenLayers

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

Feature requests
Feel free to add feature requests to the new proposals section of the future work 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