Jump to content

Gis installation

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Egil (talk | contribs) at 20:16, 25 March 2005. It may differ significantly from the current version.
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Gis navigation

Installation

Move the extensions/gis directory to the $mediawiki/extensions directory and add these lines to LocalSettings.php:

   $wgMapsourcesURL = "$mediawiki/extensions/gis/index.php";
   include( "extensions/gis/geo.php" );
   include( "extensions/gis/database.php" );

If the $wgMapsourcesURL is omitted, the geo tag will not include a link to the map sources. If the database.php is omitted, there will be no database, so the neighborhood and map support functions are disabled.

In addition, if using the database function, the gis database must be enabled. Currently, this has to be performed directly in MySQL, where the following table needs to be defined:

   USE wikidb;
   CREATE TABLE wikipedia_gis (
       gis_id int(8) unsigned NOT NULL,
       gis_latitude_min real NOT NULL,
       gis_latitude_max real NOT NULL,
       gis_longitude_min real NOT NULL,
       gis_longitude_max real NOT NULL,
       gis_globe char(12) binary,
       gis_type char(12) binary,
       gis_type_arg char(12) binary,                                                                                
       KEY gis_id (gis_id),
       INDEX gis_latitude_min (gis_latitude_min),
       INDEX gis_latitude_max (gis_latitude_max),
       INDEX gis_longitude_min (gis_longitude_min),
       INDEX gis_longitude_max (gis_longitude_max)
   );