Module: ol/control/Zoom

ol/control/Zoom


Classes

Zoom

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
duration number <optional>
250

Animation duration in milliseconds.

className string <optional>
'ol-zoom'

CSS class name.

zoomInClassName string <optional>
className + '-in'

CSS class name for the zoom-in button.

zoomOutClassName string <optional>
className + '-out'

CSS class name for the zoom-out button.

zoomInLabel string | HTMLElement <optional>
'+'

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 <optional>
'–'

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 <optional>
'Zoom in'

Text label to use for the button tip.

zoomOutTipLabel string <optional>
'Zoom out'

Text label to use for the button tip.

delta number <optional>
1

The zoom delta applied on each click.

target HTMLElement | string <optional>

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