Extension:Google Geocoder

From MediaWiki.org

Jump to: navigation, search
Crystal Clear app error.png

This extension is obsolete!
It has been replaced by Maps.

       

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
Google Geocoder

Release status: beta

Implementation  Parser function
Description Geocoder extension for MediaWiki that uses Google Geocoder service
Author(s)  Sergey ChernyshevTalk
Last Version  0.2.1 (2008-07-15)
License GPL
Download SVN

check usage (experimental)

Google Geocoder extension adds parser functions to convert addresses to geographic coordinates using Google's Geocoding service.

This extension was developed by Sergey Chernyshev and sponsored by Semantic Communities, LLC.

Contents

[edit] Usage

To convert address to a geographic coordinates:

{{#geocode:Moscow, Russia}}

Returns pair of coordinates separated by comma: 55.755786, 37.617633

To get just latitude or longitude, use geocodelat or geocodelng respecitively.

If result couldn't be found, empty value is returned (so it can be used with #if parser function, for example)

[edit] Legal WARNING

Google only allows usage of this extension in conjunction with displayable Google Map - please make sure you don't violate these rules: http://code.google.com/apis/maps/documentation/geocoding/#Geocoding

[edit] Installation

[edit] Download from SVN

To get code from Subversion, just type

svn checkout http://mediawiki-google-geocoder.googlecode.com/svn/trunk/ GoogleGeocoder

[edit] Configuration

To use this extension, you must first sign up for Google Maps Developer Key.

Then add the following to LocalSettings.php:

$wgGoogleMapsKey = 'some_long_string_from_Google';
require_once("$IP/extensions/GoogleGeocoder/GoogleGeocoder.php");

Where $wgGoogleMapsKey defines the key you got from Google. If you use other mapping extensions like Google Maps or Semantic Google Maps then you might have this variable already set, there is no need to repeat this declaration then, same value will be used by all extensions.

[edit] Contributing

If you would like to contribute patches or found some problems with the code, please send message to the discussion group:

http://groups.google.com/group/semacomm-dev

[edit] CHANGES

  • 0.2.1 (July 15, 2008) - Added space between comma and longitude to be compatible with Semantic MediaWiki Gographic coordinate format.
  • 0.2 (July 14, 2008) - Now using $wgGoogleMapsKey variable as other mapping extensions
  • 0.1 (July 13, 2008) - Original release

[edit] Support

The best way to seek help with this extension is to send you questions to our Google group

http://groups.google.com/group/semacomm-dev

extension maintainer and active users and contributors are on this list and will be able to help you.

[edit] Sites using this extension