Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

addDomListener

  • addDomListener(instance: object, eventName: string, handler: Function, capture?: boolean): MapsEventListener
  • Cross browser event handler registration. This listener is removed by calling removeListener(handle) for the handle that is returned by this function.

    deprecated

    google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead. The feature will continue to work and there is no plan to decommission it.

    Parameters

    • instance: object
    • eventName: string
    • handler: Function
    • Optional capture: boolean

    Returns MapsEventListener

addDomListenerOnce

  • addDomListenerOnce(instance: object, eventName: string, handler: Function, capture?: boolean): MapsEventListener
  • Wrapper around addDomListener that removes the listener after the first event.

    deprecated

    google.maps.event.addDomListenerOnce() is deprecated, use the standard addEventListener() method instead. The feature will continue to work and there is no plan to decommission it.

    Parameters

    • instance: object
    • eventName: string
    • handler: Function
    • Optional capture: boolean

    Returns MapsEventListener

addListener

  • addListener(instance: object, eventName: string, handler: Function): MapsEventListener
  • Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().

    Parameters

    • instance: object
    • eventName: string
    • handler: Function

    Returns MapsEventListener

addListenerOnce

  • addListenerOnce(instance: object, eventName: string, handler: Function): MapsEventListener
  • Like addListener, but the handler removes itself after handling the first event.

    Parameters

    • instance: object
    • eventName: string
    • handler: Function

    Returns MapsEventListener

clearInstanceListeners

  • clearInstanceListeners(instance: object): void
  • Removes all listeners for all events for the given instance.

    Parameters

    • instance: object

    Returns void

clearListeners

  • clearListeners(instance: object, eventName: string): void
  • Removes all listeners for the given event for the given instance.

    Parameters

    • instance: object
    • eventName: string

    Returns void

hasListeners

  • hasListeners(instance: object, eventName: string): boolean
  • Returns if there are listeners for the given event on the given instance. Can be used to to save the computation of expensive event details.

    Parameters

    • instance: object
    • eventName: string

    Returns boolean

removeListener

  • Removes the given listener, which should have been returned by addListener above. Equivalent to calling listener.remove().

    Parameters

    Returns void

trigger

  • trigger(instance: object, eventName: string, ...eventArgs: any[]): void
  • Triggers the given event. All arguments after eventName are passed as arguments to the listeners.

    Parameters

    • instance: object
    • eventName: string
    • Rest ...eventArgs: any[]

    Returns void

Generated using TypeDoc