Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapMarker<Map, T, Element>

MapMarker is a container class that is responsible for creating and managing a map marker representation on an interactive map.

Type parameters

Hierarchy

Index

Constructors

constructor

  • Parameters

    • coord: Coordinate
    • data: unknown
    • opts: T
    • Default value id: string = undefined

    Returns MapMarker

Properties

Readonly coordinate

coordinate: Coordinate

data

data: Record<string, any>

id

id: string

Readonly opts

opts: T

Accessors

isHidden

  • get isHidden(): boolean
  • Returns whether the marker is currently hidden.

    readonly
    memberof

    MapMarker

    Returns boolean

map

  • get map(): Map
  • Map currently associated with the marker.

    readonly
    memberof

    MapMarker

    Returns Map

renderable

  • get renderable(): Element
  • Native map object(s) that gets rendered to the map.

    readonly
    memberof

    MapMarker

    Returns Element

Methods

addTo

  • addTo(map: Map, index?: number): void
  • Adds the marker to the specified map.

    memberof

    MapMarker

    Parameters

    • map: Map
    • Optional index: number

    Returns void

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

invalidate

  • invalidate(): void
  • Returns void

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

remove

  • remove(): void
  • Removes the marker from the map it is currently active on.

    memberof

    MapMarker

    Returns void

setStyle

  • Parameters

    Returns void

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

update

  • Parameters

    Returns void

Generated using TypeDoc