Base class for map contextmenus. By default it is empty and requires to be extended.

Hierarchy

Constructors

Properties

#container: null | HTMLElement
#latlng: LatLng = ...
#visibleSubMenu: null | string = null
#x: number = 0
#y: number = 0

Methods

  • Clips the contextmenu, meaning it moves it on the screen to make sure it does not overflow the window.

    Returns void

  • Returns LatLng

    The Leaflet latlng object associated to the click that caused the contextmenu to be shown

  • Sets the currently visible submenu

    Parameters

    • menu: null | string

      The name of the currently visibile submenu, or null if no submenu is visible

    Returns void

  • Show the contextmenu on top of the map, usually at the location where the user has clicked on it.

    Parameters

    • x: number

      X screen coordinate of the top left corner of the context menu

    • y: number

      Y screen coordinate of the top left corner of the context menu

    • latlng: LatLng

      Leaflet latlng object of the mouse click

    Returns void

Generated using TypeDoc