Module: ol/control/Zoom

ol/control/Zoom


Classes

Zoom

Type Definitions

Options{Object}

Properties:
Name Type Description
duration number
(defaults to 250)

Animation duration in milliseconds.

className string
(defaults to 'ol-zoom')

CSS class name.

zoomInClassName string
(defaults to className + '-in')

CSS class name for the zoom-in button.

zoomOutClassName string
(defaults to className + '-out')

CSS class name for the zoom-out button.

zoomInLabel string | HTMLElement
(defaults to '+')

Text label to use for the zoom-in button. Instead of text, also an element (e.g. a span element) can be used.

zoomOutLabel string | HTMLElement
(defaults to '–')

Text label to use for the zoom-out button. Instead of text, also an element (e.g. a span element) can be used.

zoomInTipLabel string
(defaults to 'Zoom in')

Text label to use for the button tip.

zoomOutTipLabel string
(defaults to 'Zoom out')

Text label to use for the button tip.

delta number
(defaults to 1)

The zoom delta applied on each click.

target HTMLElement | string | undefined

Specify a target if you want the control to be rendered outside of the map's viewport.