Skip to content

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.

Control options

OptionTypeDefaultDescription
zoomControlBooleantrueWhether a zoom control is added to the map by default.

Options

OptionTypeDefaultDescription
positionString'topleft'The position of the control (one of the map corners). Possible values are 'topleft',
zoomInTextString'<spanThe text set on the 'zoom in' button.
zoomInTitleString'ZoomThe title set on the 'zoom in' button.
zoomOutTextString'<spanThe text set on the 'zoom out' button.
zoomOutTitleString'ZoomThe title set on the 'zoom out' button.