Options
All
  • Public
  • Public/Protected
  • All
Menu

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

deprecated

As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. Please see https://developers.google.com/maps/deprecations for deprecation details.

Hierarchy

Index

Constructors

Properties

MAX_ZINDEX: number

The maximum default z-index that the API will assign to a marker. You may set a higher z-index to bring a marker to the front.

Methods

  • Adds the given listener function to the given event name. Returns an identifier for this listener that can be used with google.maps.event.removeListener.

    Parameters

    • eventName: string
    • handler: Function

    Returns MapsEventListener

  • bindTo(key: string, target: MVCObject, targetKey?: null | string, noNotify?: boolean): void
  • Binds a View to a Model.

    Parameters

    • key: string
    • target: MVCObject
    • Optional targetKey: null | string
    • Optional noNotify: boolean

    Returns void

  • get(key: string): any
  • Gets a value.

    Parameters

    • key: string

    Returns any

  • getClickable(): boolean
  • getCursor(): undefined | null | string
  • Get the mouse cursor type shown on hover.

    Returns undefined | null | string

  • getDraggable(): boolean
  • getIcon(): undefined | null | string | Icon | Symbol
  • getOpacity(): undefined | null | number
  • getPosition(): undefined | null | LatLng
  • getTitle(): undefined | null | string
  • getVisible(): boolean
  • getZIndex(): undefined | null | number
  • notify(key: string): void
  • Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.

    Parameters

    • key: string

    Returns void

  • set(key: string, value: unknown): void
  • Sets a value.

    Parameters

    • key: string
    • value: unknown

    Returns void

  • setClickable(flag: boolean): void
  • Set if the google.maps.Marker is clickable.

    Parameters

    • flag: boolean

      If true, the Marker can be clicked.

    Returns void

  • setCursor(cursor?: null | string): void
  • Set the mouse cursor type shown on hover.

    Parameters

    • Optional cursor: null | string

      Mouse cursor type.

    Returns void

  • setDraggable(flag: null | boolean): void
  • Set if the google.maps.Marker is draggable.

    Parameters

    • flag: null | boolean

      If true, the Marker can be dragged.

    Returns void

  • setIcon(icon?: null | string | Icon | Symbol): void
  • setOpacity(opacity?: null | number): void
  • Set the opacity of the google.maps.Marker.

    Parameters

    • Optional opacity: null | number

      A number between 0.0, transparent, and 1.0, opaque.

    Returns void

  • setTitle(title?: null | string): void
  • setValues(values?: null | object): void
  • Sets a collection of key-value pairs.

    Parameters

    • Optional values: null | object

    Returns void

  • setVisible(visible: boolean): void
  • Set if the google.maps.Marker is visible.

    Parameters

    • visible: boolean

      If true, the Marker is visible

    Returns void

  • setZIndex(zIndex?: null | number): void
  • unbind(key: string): void
  • Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.

    Parameters

    • key: string

    Returns void

  • unbindAll(): void

Generated using TypeDoc