Help:Maps

From Mapping on MediaWiki
Revision as of 18:45, October 4, 2011 by 108.72.216.155 (Talk) (Undo revision 2620 by 87.105.187.246 (talk))

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

User manual

Introduction

Coordinates

Geocoding

Displaying maps

Displaying markers

Customizing markers

Mapping services

Semantic mapping

Coordinates data-type

Querying coordinate data

Distance query

Maps in forms

Admin manual

This documentation applies to Maps and Semantic Maps 0.6, and might not be completely accurate for earlier versions.

Overview

Maps adds several parser functions to MediaWiki that allow you to embed dynamic maps into pages. The simplest of these is the display_map parser function, which allows you to simply embed a map centred on some coordinates. If you want to indicate things on a map, you can do this with markers and pop-ups, using display_points.

Both functions accept a number of parameters that allow you to change the appearance and behaviour of the resulting map, depending on your own needs and preferences. These parameters can be found in tables on the documentation pages of the parser functions themselves. Some of the parameters have so called aliases, which can be used as parameter name, instead of the regular one. This is mainly to facilitate different preferences in naming, and to allow for abbreviations. An example for this is the center alias, which will have the exact same result as when using centre. These aliases can be found in the parameter tables.

Each mapping service has it's own unique features, and will add their own parameters to the display_map and display_points functions. See the documentation of the mapping services for more info about these.

Display map

Keep on wtiirng and chugging away!

Syntax

{{#display_map:{your location}|height={some height}|service={your service}}}

Example

{{#display_map:44.521, 9.0568|width=400|height=300|service=osm|zoom=18}}
Loading map...
The following error has been detected in your syntax:
* Error

Parameters

Parameter Aliases Default Usage
Default, Coordinates or Address - required The location the map will initially be centred on. Depending on which name you provide for this parameter, the values will be treated differently. This behaviour will be removed in 0.7.
  • Default (nameless) parameter: Provide either an address or set of coordinates, and Maps will figure out what to do with it.
  • Coordinates: Only valid coordinates will be accepted, addresses will not be geocoded.
  • Address: The location will be treated as an address and geocoded, even when it's a set of coordinates.
service - configurable Allows to set the mapping service that will be used to generate the map. Allowed values are: googlemaps, openlayers, osm, yahoomaps.
geoservice - configurable Allows to set the geocoding service used to turn the location into coordinates when it's an address.
width - configurable Allows to set the width of the map, in pixels.
height - configurable Allows to set the height of the map, in pixels.
zoom - configurable Allows to set the zoom level of the map. When not provided and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default.

Examples

Also see the Maps examples, which are much more extensive.

{{#display_map:New-York City}}
Loading map...
The following error has been detected in your syntax:
* Parameter coordinates must be one or more valid locations.

See also

This documentation page applies to all (Semantic) Maps versions from 0.1 to the most current version.
     

Help:Maps en 0.1