Extension:Maps/Customizing maps

From semantic-mediawiki.org
< Extension "Maps"
Extension "Maps"Extension:Maps/Customizing maps
Maps extension
Overview
Installation and Configuration
Usage
Displaying maps
Customizing maps
    ↪  Leaflet  •  Google Maps
Displaying GeoJSON
Geocoding
Converting coordinates
SMW integration
Storing coordinates
Aggregating onto a map
On this page

Maps shown with the #display_map parser function can be customized using various parameters. For instance you can change the height of the map using the height parameter. Example:

Syntax
{{#display_map: Berlin
 | height=200px
 | scrollzoom=off
}}
Result
Loading map...

There are two types of parameters.

The first type you can always use. These include all data display parameters such as locations and circles. They also include a number of basic customization options such as width and height. See below for an overview.

The second type of parameters are only available for a specific mapping service. The supported mapping services are Google Maps and Leaflet. (OpenLayers support was dropped in Maps 7.0.) For instance, only maps using Google Maps have a kml parameter. See the dedicated Leaflet parameters and Google Maps parameters pages for more information.

Always available parameters[edit]

  • All data display parameters
  • service: The mapping service to use. Can be leaflet or googlemaps Defaults to leaflet, which can be changed in your wikis configuration.
  • width: Width of the map in pixels or another supported unit. Supported units are px, ex, em and %. Also allows "auto". Default is "auto", which can be changed in your wikis configuration.
  • height: Height of the map in pixels or another supported unit. Supported units are px, ex, em and %. Default is "350", which can be changed in your wikis configuration.
  • center: On which location the map should center. This can be a coordinate or human readable location. Defaults to the locations you provided, if any.
  • title: Default title to show in popups
  • label: Default label to show in popups
  • icon: Default icon to use for markers
  • maxzoom: Whole number indicating what the maximum zoom level is
  • minzoom: Whole number indicating what the minimum zoom level is.
  • copycoords: If the coordinates of markers should be copyable. Can be yes and no (default).
  • static: If the map should be a static image instead of dynamic and interactive. Can be yes and no (default).