Legacy
Mapbox.js is no longer in active development. To learn more about our newer mapping tools see Mapbox GL JS.
You are viewing an older version of Mapbox.js. Check out v3.3.1 for the latest.
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(
|
Creates a zoom control. |
Options
Option | Type | Default | Description |
---|---|---|---|
position |
String |
'topleft' |
The position of the control (one of the map corners). See control positions. |
zoomInText |
String |
'+' |
The text set on the zoom in button. |
zoomOutText |
String |
'-' |
The text set on the zoom out button. |
zoomInTitle |
String |
'Zoom in' |
The title set on the zoom in button. |
zoomOutTitle |
String |
'Zoom out' |
The title set on the zoom out button. |