From Mapping on MediaWiki
Revision as of 07:44, March 31, 2010 by Jeroen De Dauw (Talk | contribs) (Created page with '{{User TOC}} Since people work with addresses instead of coordinates, [ geocoding] functionality is included in Maps. This means Maps will …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

User manual




Displaying maps

Displaying markers

Customizing markers

Mapping services

Semantic mapping

Coordinates data-type

Querying coordinate data

Distance query

Maps in forms

Admin manual

Since people work with addresses instead of coordinates, geocoding functionality is included in Maps. This means Maps will convert a human readable address to a set of coordinates. This functionality is based on the Google Geocoder extension, which, if installed, you will need to un-install before using Maps.

You can geocode an address with the #geocode parser function. The underneath code will return the coordinates of Moscow.

{{#geocode:Moscow, Russia}}


55.7557860, 37.6176330

For more examples, see here.

In most cases, you will want to do something like displaying a map of New York, or indicating a couple of streets somewhere. Maps has build in support for those, and will automatically recognize addresses from coordinates, allowing automatic geocoding, without the need for the #geocode parser function. This behaviour is explained further in the relevant sections of the documentation.

Geocoding service

Maps allows you to use multiple geocoding services. Both the available geocoding services as the default geocoding service are settings, and can be modified. If you don't want to use the default service, you can specify it in the parser function.

The #geocode parser function accepts a second argument, like shown below:

{{#geocode:Moscow, Russia|yahoo}}

In some cases, the default geocoding service will be overridden with another value.

  • In a display_map/display_point(s) Google Maps map: google will be used as the default
  • In a display_map/display_point(s) Yahoo! Maps map: yahoo will be used as the default

This only overrides the default geocoding service that's used when no service is provided in the parser function.

Legal warning

Both the Google and Yahoo! geocoding services have a licence that prohibits their use for anything that is not directly related to their associated mapping services, unless you have written permission. You are encouraged to read the service's licences (Google, Yahoo!) before using them.

The underneath examples are in violation of the relevant licences in most cases:

Moscow, Russia
{{geocode:Moscow, Russia|google}}