Extension:Semantic Google Maps

This is a semantic approach to including maps in MediaWiki. Semantics add great value to MediaWiki as it drastically improves both human and machine usability and readability of information.

=What does this extension do?= This extension provides a map-interface to the Geographic Coordinates attribute-type of Semantic Mediawiki.

1. Display of coordinates: The extension provides a parser function that can be used in semantic- templates. It adds a little map on pages that use these templates. The parser-function uses the semantic property of type 'Geographic Coordinates' for centering the map and displaying a marker.

2. Insertion of coordinates: On the input side, the extension provides a custom Semantic Forms input type. The input type shows a little map with a geocoder in your forms to make the insertion of coordinates easier for users.

=Installation= Copy this file to your extensions directory:


 * InsertMap.php

Add the following code to your LocalSettings.php file:

$wgGoogleMapsKey = "ABQIAAAAmbYSvchg-WUKZ1VciMUQehQX8X62KH66Ufsfzx";

require_once( "$IP/extensions/InsertMap.php" );
 * 1) parser function insert_map

(change the Google Maps api key to your own)

=Usage=

Insert Map
To include a map in a semantic template:

If a normal page holds:

Template:Location holds:

6 is the zoomlevel. Variables the insert_map function takes and their default values are:

$coordinates='1,1', $zoom = '2', $type = 'G_HYBRID_MAP', $controls = 'GSmallMapControl', $class = 'pmap', $width = , $height = , $style = ''

Insert Coordinates Form Map
Use this code in a Semantic Forms form, to include a geocoder in that form:

Coordinates:

=Dependencies=
 * Semantic Mediawiki
 * Semantic Forms
 * Parser functions

= Sites that use this extension=
 * Wikimaas - Independent city guide of Maastricht