google.maps.InfoWindow class
An overlay that looks like a bubble and is often connected to a marker.
This class extends MVCObject.
Constructor
InfoWindow([opts])
Parameters:
- opts: InfoWindowOptions optional
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
close()
Parameters: None
Return Value: None
Closes this InfoWindow by removing it from the DOM structure.
getContent()
Parameters: None
Return Value: string|Node
getPosition()
Parameters: None
Return Value: LatLng
getZIndex()
Parameters: None
Return Value: number
open([map, anchor])
Parameters:
- map: Map|StreetViewPanorama optional
- anchor: MVCObject optional
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.
setContent(content)
Parameters:
- content: string|Node
Return Value: None
setOptions(options)
Parameters:
- options: InfoWindowOptions
Return Value: None
setPosition(position)
Parameters:
- position: LatLng|LatLngLiteral
Return Value: None
setZIndex(zIndex)
Parameters:
- zIndex: number
Return Value: None
Events
function()
Arguments: None
This event is fired when the close button was clicked.
function()
Arguments: None
This event is fired when the content property changes.
function()
Arguments: None
This event is fired when the
function()
Arguments: None
This event is fired when the position property changes.
function()
Arguments: None
This event is fired when the InfoWindow's zIndex changes.