Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace for all public event functions

Access by calling const {event} = await google.maps.importLibrary("core"). See https://developers.google.com/maps/documentation/javascript/libraries.

Hierarchy

  • event

Index

Constructors

Methods

  • addDomListener(this: any, 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

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

    Returns MapsEventListener

  • addDomListenerOnce(this: any, 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

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

    Returns MapsEventListener

  • addListener(this: any, 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

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

    Returns MapsEventListener

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

    Parameters

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

    Returns MapsEventListener

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

    Parameters

    • this: any
    • instance: object

    Returns void

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

    Parameters

    • this: any
    • instance: object
    • eventName: string

    Returns void

  • hasListeners(this: any, 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

    • this: any
    • instance: object
    • eventName: string

    Returns boolean

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

    Parameters

    Returns void

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

    Parameters

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

    Returns void

Generated using TypeDoc