Display points

From Mapping on MediaWiki
(Redirected from Display point)
Jump to: navigation, search

Note: This parser function no longer exists as of version 1.1. For now it is aliased to Display_map, so will continue to work as before, but usage of it is discouraged. Use display_map instead.


Display points
What:
Map display with one or more markers
Min version:
0.1
Max version:
1.1
Function implementation:
Yes
Tag implementation:
Yes


You can use the #display_points parser function to display rich and dynamic maps with markers in articles. This function is part of the Maps extension, so you should have Maps installed in order to use it.

Usage

Mapping services

This parser hook is supported by these mapping services:


Syntax

{{#display_points: <your locations> |height= <some height> |service= <your service> }}

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.
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.
centre center configurable Allows to set the coordinates of the map's centre for display_point(s). Accepts both addresses and coordinates. When this property is not provided, the map will centre itself on the provided marker, or between the provided markers.
title - empty Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific title. When used together with label, the title will be bold and have a line under it.
label - empty Allows to set text that will be displayed in the pop-ups of all markers that do not have a specific label.
icon - Default mapping service marker Allows you to set the icon used for all markers. Should be "File:Foo.png" or "Foo.png" for a picture in the Wiki. An external link is also possible.

Examples

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

{{#display_point:New York City}}
Loading map...
The following error has been detected in your syntax:
* Parameter coordinates must be one or more valid locations.
<display_points type="terrain">
Amsterdam
Berlin|This is Berlin
London|London|The capital of [[England]].
Ghent|Ghent|Most awesome city in Europe|Green marker.png
</display_points>
Loading map...
Warning: There is an error in your syntax.


{{#display_points:New York City;Moscow;Berlin|geoservice=geonames|service=openlayers|layers=osmarender}}
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.7 to the most current version.
Other versions: 0.1 – 0.6.6      

Display points en 0.7