Display map

From Mapping on MediaWiki
Jump to: navigation, search
Display map
What:
Simple map display without markers
Min version:
0.5
Max version:
still supported
Function implementation:
Yes
Tag implementation:
Yes


You can use the #display_map parser function to display rich and dynamic maps in articles, centred on a location you can specify. This function is part of the Maps extension, so you should have Maps installed in order to use it.

Usage

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...

See also

This documentation page applies to all (Semantic) Maps versions from 0.7 to the most current version.
Other versions: 0.5 – 0.6.6      

Display map en 0.7