Class MaptilerExternalControlMaptiler
Hierarchy (View Summary)
- MaptilerCustomControl
- MaptilerExternalControl
Implements
Index
Constructors
Maptilerconstructor
- new MaptilerExternalControl(
controlElement: HTMLElement,
controlType?: MaptilerExternalControlType,
): MaptilerExternalControlConstructs an instance of External Control to have a predefined functionality
Parameters
- controlElement: HTMLElement
Element to be used as control, specified as reference to element itself
OptionalcontrolType: MaptilerExternalControlTypeOne of the predefined types of functionality
Returns MaptilerExternalControl
- controlElement: HTMLElement
Properties
Static MaptilercontrolCallbacks
MaptilerExternalControlType,
MaptilerCustomControlCallback<Event>,
> = controlCallbacks
Methods
MaptilerconfigureGroupItem
- configureGroupItem(
controlElement: HTMLElement,
controlType: MaptilerExternalControlType | undefined,
): voidConfigure 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
- controlElement: HTMLElement
MaptileronAdd
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.
- map: Map
MaptileronRemove
Unregister a control on the map and give it a chance to detach event listeners and resources. This method is called by Map.removeControl internally.
Returns void
The MaptilerExternalControl allows any existing element to automatically become a map control. Used for detected controls if
customControlsconfig is turned on.