Options
All
  • Public
  • Public/Protected
  • All
Menu

An overlay that looks like a bubble and is often connected to a marker. This class extends MVCObject.

see

Maps JavaScript API

Hierarchy

Index

Constructors

constructor

  • Creates an info window with the given options. An InfoWindow can be placed on a map at a particular position or above a marker, depending on what is specified in the options. Unless auto-pan is disabled, an InfoWindow will pan the map to make itself visible when it is opened. After constructing an InfoWindow, you must call open to display it on the map. The user can click the close button on the InfoWindow to remove it from the map, or the developer can call close() for the same effect.

    see

    Maps JavaScript API

    Parameters

    Returns InfoWindow

Methods

addListener

  • see

    {@link InfoWindowHandlerMap#closeclick closeclick} event

    see

    {@link InfoWindowHandlerMap#content_changed content_changed} event

    see

    {@link InfoWindowHandlerMap#domready domready} event

    see

    {@link InfoWindowHandlerMap#position_changed position_changed} event

    see

    {@link InfoWindowHandlerMap#zindex_changed zindex_changed} event

    Type parameters

    • N: "position_changed" | "zindex_changed" | "closeclick" | "content_changed" | "domready"

    Parameters

    Returns MapsEventListener

  • Parameters

    • eventName: string
    • handler: (...args: unknown[]) => void
        • (...args: unknown[]): void
        • Parameters

          • Rest ...args: unknown[]

          Returns void

    Returns MapsEventListener

bindTo

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

    Parameters

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

    Returns void

changed

  • changed(key: string): void

close

  • close(): void
  • Closes this InfoWindow by removing it from the DOM structure.

    see

    Maps JavaScript API

    see

    {@link InfoWindowHandlerMap#closeclick closeclick} event

    see

    open

    Returns void

get

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

    Parameters

    • key: string

    Returns any

getContent

  • getContent(): string | Node
  • see

    Maps JavaScript API

    see

    {@link InfoWindowOptions#content}

    see

    {@link InfoWindowHandlerMap#content_changed content_changed} event

    see

    setContent

    Returns string | Node

getPosition

getZIndex

  • getZIndex(): number
  • see

    Maps JavaScript API

    see

    {@link InfoWindowOptions#zIndex}

    see

    {@link InfoWindowHandlerMap#zindex_changed zindex_changed} event

    see

    setZIndex

    Returns number

notify

  • 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

open

  • Opens this InfoWindow on the given map. Optionally, an InfoWindow can be associated with an anchor. In the core API, the only anchor is the Marker class. However, an anchor can be any MVCObject that exposes a LatLng position property and optionally a Point anchorPoint property for calculating the {@link InfoWindowOptions#pixelOffset pixelOffset}. The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

    see

    Maps JavaScript API

    see

    close

    Parameters

    Returns void

set

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

    Parameters

    • key: string
    • value: any

    Returns void

setContent

  • setContent(content: string | Node): void
  • see

    Maps JavaScript API

    see

    {@link InfoWindowOptions#content}

    see

    {@link InfoWindowHandlerMap#content_changed content_changed} event

    see

    getContent

    Parameters

    • content: string | Node

    Returns void

setOptions

setPosition

setValues

  • setValues(values: any): void
  • Sets a collection of key-value pairs.

    Parameters

    • values: any

    Returns void

setZIndex

  • setZIndex(zIndex: number): void
  • see

    Maps JavaScript API

    see

    {@link InfoWindowOptions#zIndex}

    see

    {@link InfoWindowHandlerMap#zindex_changed zindex_changed} event

    see

    getZIndex

    Parameters

    • zIndex: number

    Returns void

unbind

  • 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

  • unbindAll(): void

Generated using TypeDoc