Help:Maps
Displaying maps |
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}}
* 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.
|
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}}
* Parameter coordinates must be one or more valid locations.
See also
- Display_map screencast (1.27MB) A screencast on how to use display_map with Maps 0.5.
From version | 0.1 + |
Is master page | true + |
Language code | en + |
Master page | Help:Maps + |