Extension:DatabaseGoogleExtension

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
DatabaseGoogleExtension

Release status: beta

Implementation Tag, Database
Description A modification of the Google Maps extension that stores map data in a seperate database table and allows creation of surfaces along with points.
Author(s) Sonologic
Latest version dist-0704201105
MediaWiki 1.9.3
License No license specified
Download dist-0704201116.tar.gz
Example http://www.buurtatlas.nl/ (Dutch site)
Added rights

GPLv2

Translate the DatabaseGoogleExtension extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

This extension is based on the Google Maps extension by Evan Miller. It has been modified to store location data in a database table, and the user interface to edit this data has been extended with the ability to add polygons. It is also possible to provide a map on the search result page, where search hits that have a location associated with them are shown.

Usage[edit | edit source]

Installation[edit | edit source]

1. Untar the contents of the archive into your mediawiki root:

        > cd $MEDIAWIKI
        > tar -zxvf $DOWNLOAD_DIR/dist-YYMMDDHHMM.tar.gz

2. Apply the patch:

        > patch < core.patch
        > rm core.patch

3. Create the database table:

        > psql -U $WIKIUSER $WIKIDB < docs/googlemaps_schema.txt
    or
        > mysql -u $WIKIUSER $WIKIDB < docs/googlemaps_schema.txt

4. Add the following lines to your LocalSettings.php:

        > $wgGoogleMapsKey = "<insert your google maps api key here>";
        > require_once( "extensions/GoogleMaps/GoogleMaps.php" );

5. Create the DbSettings.php file, to contain your database configuration

  for the XMLRPC library parts:

        > <?php
        > 
        > $wgDBtype           = "mysql";
        > $wgDBserver         = "localhost";
        > $wgDBname           = "wikidb";
        > $wgDBuser           = "wikidbuser";
        > $wgDBpassword       = "wikidbpassword";
        > $wgDBport           = "5432";
        > $wgDBprefix         = "";
        > 
        > ?>

6. Now edit your skin to include the googlemaps view, an example is in

  skins/MonoBook-example.php

Parameters[edit | edit source]

Changes to LocalSettings.php[edit | edit source]

$wgGoogleMapsKey = "<insert your google maps api key here>";
require_once( "extensions/GoogleMaps/GoogleMaps.php" );

Code[edit | edit source]

See also[edit | edit source]

  • Google Maps - Google Maps extension.
  • Maps - Extension that supports multiple mapping services and allows geocoding.
  • Semantic Maps - Adds semantic capabilities to Maps.