Display line

From Mapping on MediaWiki
Jump to: navigation, search

Note: The display_line parser hook has been deprecated as of version 1.1. Use Display_map, which supports all the functionality display_lines does instead.


Display line
What:
Map display with one or more markers and lines
Min version:
1.1
Max version:
1.1
Function implementation:
Yes
Tag implementation:
Yes


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

This parser hook extends functionality of Display points to include lines, clustering of markers and the possibility to copy coordinates on right mouse click.

Usage

Syntax

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

Parameters

In addition to the parameters on Display_points we have these extensions:

Parameter Aliases Default Usage
lines - optional The coordinates/locations of points to draw a line through. Needs to be a minimum of two points on the map in order to draw a line.

each line can have it's own style formatting as well as a popup bubble with title and text which supports wikiformatting.

polygons - optional The coordinates/locations of points to draw a polygon. Needs to be a minimum of two points on the map and first and last point must be equal.

each polygon can have it's own style formatting as well as a popup bubble with title and text which supports wikiformatting.

copycoords - configurable Enables or disables right click to copy coordinates.
markercluster - configurable Enables or disables clustering of markers. only works with googlemaps.

Examples

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

{{#display_line: Bergen;Kalfaret Bergen;Stavanger|lines=Bergen:Kalfaret Bergen;Stavanger:Bergen}}
Loading map...
Warning: There is an error in your syntax.
<display_line lines="Bergen:Stavanger|title|[[TestLink]]|#00FF00|0.5|5;60.3912628,61.3912628:62.3912628,63.3912628" copycoords="on" markercluster="on">
64.168107,-18.984375
Bergen|title|[[TestLink]]
Stavanger
</display_line>

The line "Bergen:Stavanger|title|[[TestLink]]|#00FF00|0.5|5" deserves some extra explanation:
the part Bergen:Stavanger is where to draw a line between, here you can add as many locations or coordinates as you wish.
next comes "title|[[TestLink]]" which shows a popup bubble when left clicking on the line wite title as the title and [[TestLink]] as the content.
and finally we have "#00FF00|0.5|5" which designates the color, opacity and width of the line.
Loading map...
Warning: There is an error in your syntax.

See also

This documentation page applies to all (Semantic) Maps versions from 1.1 to the most current version.
     

Display line en 1.1