On this page

Class MaptilerExternalControlMaptiler

The MaptilerExternalControl allows any existing element to automatically become a map control. Used for detected controls if customControls config is turned on.

Hierarchy (View Summary)

Implements

Index

Constructors

Properties

controlCallbacks: Record<
    MaptilerExternalControlType,
    MaptilerCustomControlCallback<Event>,
> = controlCallbacks

Methods

  • Configure a child element to be part of this control and to have a predefined functionality added

    Parameters

    • controlElement: HTMLElement

      Element that is a descendant of the control element and that optionally should have some functionality

    • controlType: MaptilerExternalControlType | undefined

      One of the predefined types of functionality

    Returns void

  • Register a control on the map and give it a chance to register event listeners and resources. This method is called by Map.addControl internally.

    Parameters

    • map: Map

      the Map this control will be added to

    Returns HTMLElement

    The control's container element. This should be created by the control and returned by onAdd without being attached to the DOM: the map will insert the control's element into the DOM as necessary.

Was this helpful?
SDK JS
Reference
MaptilerExternalControl