Extension:Maps/Displaying maps

Displaying data
The  parser function supports a number of parameters that allow you to display markers and shapes on the map.

Markers
Via the  parameter you can have the map display markers. This is the main parameter of  and is normally not named explicitly. These can be addresses or coordinates (and you can mix the two).

Example:

You can customize the markers per location. (Map wide customization is also possible via dedicated parameters.) The syntax is:

Location~Popup title~Popup text~File:CustomIcon~Group~Inline label~File:VisitedIcon


 * Location: the location where to display the marker. This can be a set of coordinates or an address
 * Popup title and Popup text: optional content for a popup shown when the marker is clicked. No popup is shown if both are empty
 * File:CustomIcon: optional name of an image to display instead of the default marker
 * Group:
 * Inline label: optional label shown next to the marker. Currently only shown when using Google Maps
 * File:VisitedIcon: optional name of an image to display as marker when the marker is clicked

Example:

Alternative syntax
When you have many customized markers, using the  parser function can get unwieldy. For this reason you can also use the  tag. It has all the same parameters as the parser function, the only difference is the syntax. Each location goes own its own line and they do not need to be separated with a semicolon.

Example:

 Gent, Belgie~The city Ghent~Ghent is awesome~ ~ ~Ghent Brussel~The city Brussel~The capital of Belgium~ ~ ~Brussels Antwerp~The city Antwerp~ ~ ~ ~Antwerp 

 Gent, Belgie~The city Ghent~Ghent is awesome~ ~ ~Ghent Brussel~The city Brussel~The capital of Belgium~ ~ ~Brussels Antwerp~The city Antwerp~ ~ ~ ~Antwerp 

GeoJSON
As of version 5.6, Maps supports display of GeoJSON via the  parameter. See Displaying GeoJSON.

Lines
Via the  parameter you can display lines on the map. Each line has at least two locations. As with markers you can specify a popup title and text. You can also specify the looks of the line. The syntax is:

First address:Second address:Optional third address:etc ~Popup title~Popup text~Line color~Line opacity~Line thickness

Example:

Polygons
Via the  parameter you can display polygons on the map. Each polygons has at least two locations. As with markers you can specify a popup title and text. You can also specify the looks of the polygon. The syntax is:

First address:Second address:Optional third address ~Popup title~Popup text~Border color~Border opacity~Border thickness~Fill color~Fill opacity ~Show only on hover

Example:

Circles
Via the  parameter you can display circles on the map. Each circles has a center and a diameter. You can specify the popup title and text and the looks of the circle. The syntax is:

Address of the center:Diameter~Popup title~Popup text~Border color~Border opacity~Border thickness~Fill color~Fill opacity

Example:

Rectangles
Via the  parameter you can display rectangles on the map. Each rectangle has a North East location and a South West location. You can specify the popup title and text and the looks of the rectangle. The syntax is:

North East location:South West location ~Popup title~Popup text~Border color~Border opacity~Border thickness~Fill color~Fill opacity

Example: