Extension:Semantic Google Maps
From MediaWiki.org
|
Semantic Google Maps Release status: beta |
|
|---|---|
![]() |
|
| Implementation | Parser functions |
| Description | SGM allows users to add Google Maps to wiki pages based upon structured data. |
| Author(s) | Robert Buzink |
| Version | 0.2 (September 2007) |
| MediaWiki | 1.9.* or greater |
| Download | Semantic_Maps.php |
Semantic Google Maps 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.
Contents |
[edit] 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.
[edit] Installation
Copy this file to your extensions directory:
Add the following code to your LocalSettings.php file after the line that installs Semantic MediaWiki (and after the line that installs Semantic Forms, if you use it):
$wgGoogleMapsKey = "ABQIAAAAmbYSvchg-WUKZ1VciMUQehQX8X62KH66Ufsfzx"; # parser function insert_map require_once( "$IP/extensions/Semantic_Maps.php" );
(change the Google Maps API key to your own)
[edit] Usage
[edit] Insert Map
To include a map in a semantic template:
If a normal page holds:
{{Location
|Coordinates=50.85137811° N, 5.690781176° E
}}
Template:Location holds:
{{#if:{{{Coordinates|}}}|{{#insert_map:{{{Coordinates}}}|6}}}}
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 =
[edit] Insert Coordinates Form Map
Use this code in a Semantic Forms form, to include a geocoder in that form:
<p><label>Coordinates:</label> {{{field|Coordinates|input type=coordinatesmap}}}</p>
[edit] Dependencies
[edit] Sites that use this extension
- Placeography - Histories and stories about buildings and land
- Tech Presentations
- Verwaltungskooperation - Cooperation in Public Administration
- Wikimaas - Independent city guide of Maastricht


