• JMap.Event.Map.on.mapDestroy

    This event is triggered when the map is destroyed.

    Parameters

    • listenerId: string

      Your listener id (must be unique for all map events)

    • fn: (() => void)

      Your listener function

        • (): void
        • Returns void

    Returns void

    Example

    // Each time the map is destroyed, will display a message in the console
    JMap.Event.Map.on.mapDestroy(
    "custom-map-destroyed",
    () => console.log(`The map has been destroyed`)
    )