Skip to main content

ZoomWidget

This widget controls the zoom level of a deck.gl view. Click '+' to zoom in by 1, click '-' to zoom out by 1. Supports controlling Map and Globe views.

Props

id (string)

Default: 'zoom'

Unique identifier of the widget.

viewId (string, optional)

Default: null

The widget is attached to the view identified by this viewId. When assigned, the widget is placed within the specified view, and exclusively interacts with it. Required when using multiple views.

placement (string, optional)

Default: 'top-left'

Widget position within the view relative to the map container. Valid options are top-left, top-right, bottom-left, bottom-right, or fill.

orientation (string, optional)

Default: 'vertical'

Widget button orientation. Valid options are vertical or horizontal.

zoomInLabel (string, optional)

Tooltip message displayed while hovering a mouse over the zoom in button.

Default: 'Zoom In'

zoomOutLabel (string, optional)

Tooltip message displayed while hovering a mouse over the zoom out button.

Default: 'Zoom Out'

transitionDuration (number, optional)

Default: 200

Zoom transition duration in milliseconds.

style (object, optional)

Default: {}

Additional CSS styles for the canvas.

className (string, optional)

Default: undefined

Class name to attach to the widget element. The element has the default class name of deck-widget deck-zoom-widget.