Extension:MultiMaps/Documentation

To add a map to a wiki page need to write the magic word multimaps and specify the necessary parameters.

The syntax for the magic word multimaps is:

{{#multimaps: param_name=param_value
|[ ... ]
}}
  • param_name - it may be a element to be added to the card ('marker' by default), or the property of the map
  • param_value - is data that is assigned to the specified parameter

General edit

To display a map at N10° and E10°:

{{#multimaps: 10, 10
}}

Map elements edit

To add an element to the card, use the following syntax:

{{#multimaps: |element_name=element_item}}
  • element_name - should be the name one of the following elements: Marker, Line, Polygon, Rectangle, Circle.
  • element_item - parameters required to display the item on the map, such as coordinates, pop-up text, colors, etc...

element_name - is not case sensitive, can be both singular and the plural (marker, markers)
element_item - can be a single item and the items list. List separator of items specified in the variable $egMultiMaps_SeparatorItems, the default is ";"

Parameters in element_item are separated by a character specified in the variable $egMultiMaps_DelimiterParam, the default is "~".

The first and mandatory parameter is the geographical coordinates of the element. They can be written as a decimal fraction degrees or specifying the minutes and seconds (55.755831, 37.617673 or 55°45'20.9916", 37°37'3.6228"). If sides of the world is not specified, the default is the first north, second east. Sides of the world specified the corresponding character before or after the value (N55.755831°, E37.617673° or 55°45'20.9916"N, 37°37'3.6228"E)

Latitude and longitude values ​​are separated by a character specified in the variable $egMultiMaps_OptionsSeparator, the default is ",".

Geographic coordinates can be a delimited list of values ​​specified in the variable $egMultiMaps_CoordinatesSeparator, the default is ":".

Instead of geographic coordinates, you can specify the address. This address will be converted to the coordinates using the appropriate Geocoding Service. Examples ["empty" links]: Leaflet, Google, Yandex[citation needed]

The other parameters can also be specified without a name, if they go in the order of priority set. Parameter has the following syntax: "param_name=param_value".

For example, you can set the marker icon in the following ways:

{{#multimaps: 10,10~ ~ ~MyIcon.png}}
{{#multimaps: 10,10~icon=MyIcon.png}}

Marker edit

Syntax:

{{#multimaps: 
| Marker = Coordinates ~ Title ~ Text ~ Icon
}}

Line edit

Syntax:

{{#multimaps: 
| Line = Coordinates ~ Title ~ Text ~ Color ~ Weight ~ Opacity
}}

Polygon edit

Syntax:

{{#multimaps: 
| Polygon = Coordinates ~ Title ~ Text ~ Color ~ Weight ~ Opacity ~ FillColor ~ FillOpacity ~ Fill
}}

Rectangle edit

Syntax:

{{#multimaps: 
| Rectangle = Coordinates ~ Title ~ Text ~ Color ~ Weight ~ Opacity ~ FillColor ~ FillOpacity ~ Fill
}}

Circle edit

Syntax:

{{#multimaps: 
| Circle = Coordinates : radius ~ Title ~ Text ~ Color ~ Weight ~ Opacity ~ FillColor ~ FillOpacity ~ Fill
}}

Map properties edit

You can set the following properties for the map:

Service edit

At the moment, you can display a map with the map services leaflet (for accessing openstreetmap.org), google and yandex

Syntax:

{{#multimaps: [ ... ]
| service = name_of_service
}}

List of available services is defined in the variable $egMultiMaps_MapServices

Height edit

The height of the map window can be specified using height.

Syntax:

{{#multimaps: [ ... ]
| height = 100px
}}

The height can be also specified in percent. This works similar as specifying heights in w:CSS.

Width edit

The width of the map display is specified using width.

Zoom edit

Zoom specifies the zoom level of the map when the page is presented to the user. The user can then change it using + and - or the mouse wheel. OpenStreetMap tiles are available from zoom 0 through 19 for instance.

Syntax:

{{#multimaps: [ ... ]
| zoom = 4
}}

Maxzoom/Minzoom edit

This property allows the editing user to limit the available zoom range for a page reader setting a minimum and a maximum.

Syntax:

{{#multimaps: [ ... ]
| maxzoom = 10
| minzoom = 3
}}

Center edit

The center property sets the map center to a given latitude and longitude. By default it takes two comma-separated values (latitude, longitude). The difference between using the very first argument and the center argument, is that this one does not create a marker at the specified location.

Syntax:

{{#multimaps:
| center = 10.2,52.9
}}