Widget:Map

From WikiEducator
Jump to: navigation, search

A tiled map built from Open Street Map data using the Leaflet library.

Usage

{{#widget:Map|width=480|height=320|lat=-45.9|long=169.8|zoom=7|type=map|zoomcontrol=1}}

Parameters

width
map width in pixels (default: 480)
height
map height in pixels (default: 320)
lat
map center in degrees north
long
map center in degrees east
zoom
initial zoom value
type
map type (currently ignored and always set to map)
zoomcontrol
set to 0 for no zoom control, (default: 1)
flags
comma separated list of lat, long, info triplets (example: flags=41.1,-169.33,I am here,41.2,-169.40,I was there)

Implementation Note

The map is inserted into a named <DIV> on the page, allowing adding style elements around it.

Example

Fiordland National Park

<div>{{#widget:Map|lat=-45|long=168|zoom=6|flags=-44.67,168.0,Key Summit,-45.41,167.717,Visitor Centre,-44.9333,167.9333,Start of Milford Track}}</div>

produces: