Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IconDirective

Hierarchy

  • Icon
    • IconDirective

Index

Constructors

constructor

Properties

options

options: IconOptions

updateEvent

updateEvent: EventEmitter<Event> = new EventEmitter()

Accessors

iconAnchor

  • get iconAnchor(): Point
  • set iconAnchor(val: Point): void

iconSize

  • get iconSize(): Point
  • set iconSize(val: Point): void

iconUrl

  • get iconUrl(): string
  • set iconUrl(val: string): void

popupAnchor

  • get popupAnchor(): Point
  • set popupAnchor(val: Point): void

shadowAnchor

  • get shadowAnchor(): Point
  • set shadowAnchor(val: Point): void

shadowSize

  • get shadowSize(): Point
  • set shadowSize(val: Point): void

shadowUrl

  • get shadowUrl(): string
  • set shadowUrl(val: string): void

Methods

addEventListener

  • addEventListener(type: string, fn: EventHandlerFn, context?: Object)
  • addEventListener(eventMap: EventHandlerFnMap)
  • Alias for on(...)

    Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: EventHandlerFn
    • Optional context: Object
  • Alias for on(...)

    Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: EventHandlerFnMap

addEventParent

  • addEventParent(obj: Evented)
  • Adds an event parent - an Evented that will receive propagated events

    Parameters

    • obj: Evented

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: EventHandlerFn, context?: Object)
  • addOneTimeEventListener(eventMap: EventHandlerFnMap)
  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: EventHandlerFn
    • Optional context: Object
  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: EventHandlerFnMap

addTo

  • addTo(map: Map)
  • Parameters

    • map: Map

beforeAdd

  • beforeAdd(map: Map)
  • Parameters

    • map: Map

bindPopup

  • bindPopup(content: string, options?: PopupOptions)
  • bindPopup(content: HTMLElement, options?: PopupOptions)
  • bindPopup(content: function, options?: PopupOptions)
  • bindPopup(content: Popup)
  • Parameters

    • content: string
    • Optional options: PopupOptions
  • Parameters

    • content: HTMLElement
    • Optional options: PopupOptions
  • Parameters

    • content: function
        • (layer: Layer): Content
        • Parameters

          • layer: Layer

          Returns Content

    • Optional options: PopupOptions
  • Parameters

    • content: Popup

bindTooltip

  • bindTooltip(content: string, options?: TooltipOptions)
  • bindTooltip(content: HTMLElement, options?: TooltipOptions)
  • bindTooltip(content: function, options?: TooltipOptions)
  • bindTooltip(content: Tooltip, options?: TooltipOptions)
  • Parameters

    • content: string
    • Optional options: TooltipOptions
  • Parameters

    • content: HTMLElement
    • Optional options: TooltipOptions
  • Parameters

    • content: function
        • (layer: Layer): Content
        • Parameters

          • layer: Layer

          Returns Content

    • Optional options: TooltipOptions
  • Parameters

    • content: Tooltip
    • Optional options: TooltipOptions

clearAllEventListeners

  • clearAllEventListeners()
  • Alias for off()

    Removes all listeners to all events on the object.

closePopup

  • closePopup()

closeTooltip

  • closeTooltip()

createIcon

  • createIcon(oldIcon?: HTMLElement): HTMLElement
  • Parameters

    • Optional oldIcon: HTMLElement

    Returns HTMLElement

createShadow

  • createShadow(oldIcon?: HTMLElement): HTMLElement
  • Parameters

    • Optional oldIcon: HTMLElement

    Returns HTMLElement

fire

  • fire(type: string, data?: Object, propagate?: boolean)
  • Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: Object
    • Optional propagate: boolean

fireEvent

  • fireEvent(type: string, data?: Object, propagate?: boolean)
  • Alias for fire(...)

    Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: Object
    • Optional propagate: boolean

getAttribution

  • getAttribution(): string
  • Returns string

getEvents

  • getEvents(): object
  • Returns object

    • [name: string]: function
        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

getPane

  • getPane(name?: string): HTMLElement
  • Parameters

    • Optional name: string

    Returns HTMLElement

getPopup

  • getPopup(): Popup
  • Returns Popup

getTooltip

  • getTooltip(): Tooltip
  • Returns Tooltip

hasEventListeners

  • hasEventListeners(type: string): boolean
  • Alias for listens(...)

    Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

isPopupOpen

  • isPopupOpen(): boolean
  • Returns boolean

isTooltipOpen

  • isTooltipOpen(): boolean
  • Returns boolean

listens

  • listens(type: string): boolean
  • Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

off

  • off(type: string, fn?: EventHandlerFn, context?: Object)
  • off(eventMap: EventHandlerFnMap)
  • off()
  • Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • Optional fn: EventHandlerFn
    • Optional context: Object
  • Removes a set of type/listener pairs.

    Parameters

    • eventMap: EventHandlerFnMap
  • Removes all listeners to all events on the object.

on

  • on(type: string, fn: EventHandlerFn, context?: Object)
  • on(eventMap: EventHandlerFnMap)
  • Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: EventHandlerFn
    • Optional context: Object
  • Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: EventHandlerFnMap

onAdd

  • onAdd(map: Map)
  • Parameters

    • map: Map

onRemove

  • onRemove(map: Map)
  • Parameters

    • map: Map

once

  • once(type: string, fn: EventHandlerFn, context?: Object)
  • once(eventMap: EventHandlerFnMap)
  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: EventHandlerFn
    • Optional context: Object
  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: EventHandlerFnMap

openPopup

  • openPopup()
  • openPopup(latlng: LatLng)
  • openPopup(latlng: LatLngLiteral)
  • openPopup(latlng: LatLngTuple)
  • Parameters

    • latlng: LatLng
  • Parameters

    • latlng: LatLngLiteral
  • Parameters

    • latlng: LatLngTuple

openTooltip

  • openTooltip()
  • openTooltip(latlng: LatLng)
  • openTooltip(latlng: LatLngLiteral)
  • openTooltip(latlng: LatLngTuple)
  • Parameters

    • latlng: LatLng
  • Parameters

    • latlng: LatLngLiteral
  • Parameters

    • latlng: LatLngTuple

remove

  • remove()

removeEventListener

  • removeEventListener(type: string, fn: EventHandlerFn, context?: Object)
  • removeEventListener(eventMap: EventHandlerFnMap)
  • Alias for off(...)

    Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • fn: EventHandlerFn
    • Optional context: Object
  • Alias for off(...)

    Removes a set of type/listener pairs.

    Parameters

    • eventMap: EventHandlerFnMap

removeEventParent

  • removeEventParent(obj: Evented)
  • Removes an event parent, so it will stop receiving propagated events

    Parameters

    • obj: Evented

removeFrom

  • removeFrom(map: Map)
  • Parameters

    • map: Map

setPopupContent

  • setPopupContent(content: string)
  • setPopupContent(content: HTMLElement)
  • setPopupContent(content: Popup)
  • Parameters

    • content: string
  • Parameters

    • content: HTMLElement
  • Parameters

    • content: Popup

setTooltipContent

  • setTooltipContent(content: string)
  • setTooltipContent(content: HTMLElement)
  • setTooltipContent(content: Tooltip)
  • Parameters

    • content: string
  • Parameters

    • content: HTMLElement
  • Parameters

    • content: Tooltip

togglePopup

  • togglePopup()

toggleTooltip

  • toggleTooltip()

unbindPopup

  • unbindPopup()

unbindTooltip

  • unbindTooltip()

Generated using TypeDoc