Control.Zoom

A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its zoomControl option to false. Extends Control.

Creation

Factory Description
L.control.zoom(<Control.Zoom options> options) Creates a zoom control

Options

Option Type Default Description
zoomInText String '+' The text set on the 'zoom in' button.
zoomInTitle String 'Zoom in' The title set on the 'zoom in' button.
zoomOutText String '-' The text set on the 'zoom out' button.
zoomOutTitle String 'Zoom out' The title set on the 'zoom out' button.
Option Type Default Description
position String 'topright' The position of the control (one of the map corners). Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'

Methods

Method Returns Description
getPosition() string

Returns the position of the control.

setPosition(<string> position) this

Sets the position of the control.

getContainer() HTMLElement

Returns the HTMLElement that contains the control.

addTo(<Map> map) this

Adds the control to the given map.

remove() this

Removes the control from the map it is currently active on.

v1.1.0
Props Wrld.Prop
Themes Wrld.themes
Heatmaps Wrld.Heatmap
Events Event objects
Services (Optional) WrldPoiApi