Documentation function
From Maps for MediaWiki
The #mapsdoc
parser function generates a table with all supported parameters for one mapping service.
This function is there mainly to keep the documentation on this wiki completely in sync with the code. You can also use it on your own wiki and get a list that reflects the version of Maps you have installed, together with your own wiki configuration.
Syntax
{{#mapsdoc: <leaflet | googlemaps3> |parameters=<all | base | specific> }}
- Base: parameters supported by all mapping services
- Specific: parameters specific to the selected mapping service
- All: Both the base and the specific parameters
Examples
{{#mapsdoc:leaflet|parameters=all}}
Result:
⧼validator-describe-header-parameter⧽ | ⧼validator-describe-header-type⧽ | ⧼validator-describe-header-default⧽ | ⧼validator-describe-header-description⧽ |
---|---|---|---|
zoom | ⧼validator-type-integer⧽ | no | The zoom level for the map. For maps with markers this will default to the most zoomed in level that still shows all markers. |
width | ⧼validator-type-dimension⧽ | auto | Allows setting the width of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %. |
height | ⧼validator-type-dimension⧽ | 350 | Allows setting the height of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em. |
centre | ⧼validator-type-string⧽ | no | The location on which the map should be centered |
title | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Allows setting 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 underlined. |
label | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Allows setting text that will be displayed in the pop-ups of all markers that do not have a specific label. |
icon | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Allows setting the icon used for all markers. |
lines | List of lines | ⧼validator-describe-empty⧽ | Lines to display |
polygons | List of geographical polygons | ⧼validator-describe-empty⧽ | Polygons to display |
circles | List of circles | ⧼validator-describe-empty⧽ | Circles to display |
rectangles | List of rectangles | ⧼validator-describe-empty⧽ | Rectangles to display |
maxzoom | ⧼validator-type-integer⧽ | no | The maximum zoom level |
minzoom | ⧼validator-type-integer⧽ | no | The minimum zoom level |
copycoords | ⧼validator-type-boolean⧽ | no | Show a dialog when clicking on a marker from which its coordinates may be copied |
static | ⧼validator-type-boolean⧽ | no | Make the map static |
defzoom | ⧼validator-type-integer⧽ | 14 | Allows setting the default zoom level of the map. |
layers | ⧼validator-type-string-list⧽ | OpenStreetMap | The layers that will be available in the layer selector. The first layer will be shown when the map loads. |
image layers | ⧼validator-type-string-list⧽ | ⧼validator-describe-empty⧽ | Image base layers. The first layer will be shown by default. If any images are specified, they will be used instead of the regular map layers. |
overlays | ⧼validator-type-string-list⧽ | ⧼validator-describe-empty⧽ | The overlay layers that will be shown when the map loads. |
resizable | ⧼validator-type-boolean⧽ | no | Makes the map resizable by dragging at its lower right corner. |
fullscreen | ⧼validator-type-boolean⧽ | no | Enable fullscreen button |
scrollwheelzoom | ⧼validator-type-boolean⧽ | yes | Indicates if mouse scrolling should be enabled or not. |
cluster | ⧼validator-type-boolean⧽ | no | Allows merging of multiple nearby markers into one marker |
clustermaxzoom | ⧼validator-type-integer⧽ | 20 | The maximum zoom level where clusters may exist. |
clusterzoomonclick | ⧼validator-type-boolean⧽ | yes | Whether the default behaviour of clicking on a cluster is to zoom into it. |
clustermaxradius | ⧼validator-type-integer⧽ | 80 | The maximum radius that a cluster will cover. |
clusterspiderfy | ⧼validator-type-boolean⧽ | yes | When you click a cluster at the bottom zoom level we spiderfy it so you can see all of its markers. |
geojson | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | URL of a file or name of the page containing GeoJSON data |
clicktarget | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | When clicking on the map you will be sent to this URL. %lat% is replaced by the latitude and %long% by the longitude |