Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IControl

Hierarchy

  • IControl

Implemented by

Index

Methods

Methods

onAdd

  • onAdd(map: Map): HTMLElement
  • Should contain code that creates all the neccessary DOM elements for the control, adds listeners on relevant map events, and returns the element containing the control. Called on map.addControl(control) or control.addTo(map).

    Parameters

    Returns HTMLElement

onRemove

  • onRemove(map: Map): void
  • Optional, should contain all clean up code (e.g. removes control's event listeners). Called on map.removeControl(control) or control.removeFrom(map). The control's DOM container is removed automatically.

    Parameters

    Returns void