Atlaslog
Atlaslog / Leaflet / API reference / Control.Zoom
Leaflet · API reference

Control.Zoom

Quick answer

L.control.zoom renders the plus and minus buttons that zoom the map and remains the primary zoom entry point on touch devices. It disables its buttons automatically at minZoom and maxZoom. Both button labels and hover titles are customizable on each instance.

Last verified 2026-11-03 · Leaflet 1.9.4 · Cite this page
L.control.zoom( options ) → Control.Zoom
Key points
Example
var map = L.map('map', {
  center: [39.907359, 116.391263],
  zoom: 12,
  zoomControl: false,
  zoomSnap: 0.5
});

L.control.zoom({
  position: 'bottomright',
  zoomInText: '<span aria-hidden="true">+</span>',
  zoomInTitle: '放大一级',
  zoomOutText: '<span aria-hidden="true">-</span>',
  zoomOutTitle: '缩小一级'
}).addTo(map);

/* 按钮会在达到 minZoom / maxZoom 时自动禁用,无需自己判断 */
map.setMinZoom(10);
map.setMaxZoom(17);
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). Control.Zoom. https://www.jingweizhi.com/en/leaflet/api/control-zoom.html (accessed 2026-11-03).