Skip to content

Zoom

Zoom is the zoom control. It extends Control. It provides zoom-in/zoom-out buttons on the map, and can also achieve continuous zooming via the scroll wheel (seamless). It is displayed by default at the top-left corner.

js
import { Zoom } from "maptalks";

const zoom = new Zoom({
  position: "top-left",
  zoomLevel: true,
  seamless: true
}).addTo(map);

Constructor

js
new Zoom(options)

Parameters:

  • options — Zoom control options.

options

NameTypeDescriptionDefault
positionStringThe control position"top-left"
zoomLevelBooleanWhether the current zoom level is showntrue
seamlessBooleanWhether seamless continuous zooming is supportedfalse