ResetViewWidget
This widget resets the view state of a deck.gl viewport to its initial state. The user clicks the widget to return to the initial view.
import {ResetViewWidget} from '@deck.gl/widgets';
import {Deck} from '@deck.gl/core';
const deck = new Deck({
widgets: [new ResetViewWidget()]
});
Types
ResetViewWidgetProps
The ResetViewWidget
accepts the generic WidgetProps
:
id
(default'reset-view'
) - Unique id for this widgetplacement
(default'top-left'
) - Widget position within the view relative to the map containerviewId
(defaultnull
) - TheviewId
prop controls how a widget interacts with views.style
(default{}
) - Additional inline styles on the top HTML element.className
(default''
) - Additional classnames on the top HTML element.
label
(string, optional)
Tooltip message displayed while hovering a mouse over the widget.
Default: 'Reset View'
Styles
Learn more about how to replace icons in the styling guide.
Name | Type | Default |
---|---|---|
--icon-reset-view | SVG Data Url | [Material Symbol Reset Focus][icon_reset_view] |