Skip to content

Latest commit

 

History

History
153 lines (78 loc) · 3.86 KB

File metadata and controls

153 lines (78 loc) · 3.86 KB

See html formatted version

InfoWindow class

google.maps.InfoWindow class

An overlay that looks like a bubble and is often connected to a marker.

This class extends MVCObject.

Constructor

undefined

InfoWindow([opts])

Parameters: 

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.

Methods

undefined

close()

Parameters:  None

Return Value:  None

Closes this InfoWindow by removing it from the DOM structure.

undefined

getContent()

Parameters:  None

Return Value:  string|Node

undefined

getPosition()

Parameters:  None

Return Value:  LatLng

undefined

getZIndex()

Parameters:  None

Return Value:  number

undefined

open([map, anchor])

Parameters: 

Return Value:  None

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 pixelOffset (see InfoWindowOptions). The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

undefined

setContent(content)

Parameters: 

  • content:  string|Node

Return Value:  None

undefined

setOptions(options)

Parameters: 

Return Value:  None

undefined

setPosition(position)

Parameters: 

Return Value:  None

undefined

setZIndex(zIndex)

Parameters: 

  • zIndex:  number

Return Value:  None

Events

undefined

function()

Arguments:  None

This event is fired when the close button was clicked.

undefined

function()

Arguments:  None

This event is fired when the content property changes.

undefined

function()

Arguments:  None

This event is fired when the

containing the InfoWindow's content is attached to the DOM. You may wish to monitor this event if you are building out your info window content dynamically.

undefined

function()

Arguments:  None

This event is fired when the position property changes.

undefined

function()

Arguments:  None

This event is fired when the InfoWindow's zIndex changes.