Class: BaseWidget

BaseWidget

An abstract base class for creating widgets in the Go3dMap application. Provides common functionality for managing widget activation, deactivation, and rendering.

new BaseWidget(map, widgetOptions)

GoMap/Widgets/BaseWidget.ts, line 9

Constructs a BaseWidget instance.

Name Type Description
map Go3dMap

The Go3dMap instance that this widget will be associated with.

widgetOptions Go3dWidgetsConfig

Configuration options for the widget.

Methods

__createButton(svg){HTMLElement}

GoMap/Widgets/BaseWidget.ts, line 57

Creates a button element for the widget with the specified SVG content.

Name Type Description
svg string

The SVG markup to use as the button's inner content.

Returns:
Type Description
HTMLElement
  • The button element created.

getElement(){HTMLElement}

GoMap/Widgets/BaseWidget.ts, line 48

Retrieves the HTML element representing the widget.

Returns:
Type Description
HTMLElement
  • The HTML element of the widget.

getMap(){Go3dMap}

GoMap/Widgets/BaseWidget.ts, line 91

Retrieves the Go3dMap instance associated with this widget.

Returns:
Type Description
Go3dMap
  • The Go3dMap instance.