LoadingWidget (Experimental)
This widget shows a spinning indicator while any deck.gl layers are loading data.
import {_LoadingWidget as LoadingWidget} from '@deck.gl/widgets';
import {Deck} from '@deck.gl/core';
const deck = new Deck({
widgets: [new LoadingWidget()]
});
Types
LoadingnWidgetProps
The LoadingnWidget
accepts the generic WidgetProps
:
id
(default'loading'
) - 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.
Props
id
(string, optional)
Default: 'loading'
The id
must be unique among all your widgets at a given time.
Note: It is necessary to set id
explicitly if you have more than once instance of the same widget.
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
.
label
(string, optional)
Tooltip message displayed while hovering a mouse over the widget.
Default: 'Loading data'