Follow us on GitHub

com.google.gwt.maps.client.overlays
Class InfoWindow

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.mvc.MVCObject<InfoWindow>
          extended by com.google.gwt.maps.client.overlays.InfoWindow

public class InfoWindow
extends MVCObject<InfoWindow>

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


Constructor Summary
protected InfoWindow()
          use newInstance(); Creates an info window with the given options.
 
Method Summary
 HandlerRegistration addCloseClickHandler(CloseClickMapHandler handler)
          This event is fired when the close button was clicked.
 HandlerRegistration addContentChangeHandler(ContentChangeMapHandler handler)
          This event is fired when the content property changes.
 HandlerRegistration addDomReadyHandler(DomReadyMapHandler handler)
          This event is fired when the <div> containing the InfoWindow's content is attached to the DOM.
 HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler)
          This event is fired when the position property changes.
 HandlerRegistration addZindexChangedHandler(ZindexChangeMapHandler handler)
          This event is fired when the InfoWindow's zIndex changes.
 void close()
          Closes this InfoWindow by removing it from the DOM structure.
 Element getContent_Node()
          get content if its a node
 String getContent_String()
          get content if its a string
 LatLng getPosition()
          get Position
 int getZindex()
          get Z index
static InfoWindow newInstance(InfoWindowOptions options)
          Creates an info window with the given options.
 void open(MapWidget mapWidget)
          Opens this InfoWindow on the given map.
 void open(MapWidget mapWidget, MVCObject<?> anchor)
          Opens this InfoWindow on the given map.
 void open(StreetViewPanoramaWidget streetViewPanoRamaWidget)
          Opens this InfoWindow on the given map.
 void open(StreetViewPanoramaWidget streetViewPanoRamaWidget, MVCObject<?> anchor)
          Opens this InfoWindow on the given map.
 void setContent(Element element)
          set Content
 void setContent(String content)
          set Content
 void setContent(Widget widget)
           
 void setOptions(InfoWindowOptions options)
          set Options
 void setPosition(LatLng position)
          set Position
 void setZindex(int index)
          set Z index
 
Methods inherited from class com.google.gwt.maps.client.mvc.MVCObject
bindTo, bindTo, bindTo, changed, createInstanceOfMVCObject, get, notify, set, setValues, unbind, unbindAll
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfoWindow

protected InfoWindow()
use newInstance(); 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.

Method Detail

newInstance

public static final InfoWindow newInstance(InfoWindowOptions options)
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.

Parameters:
options - InfoWindowOptions

close

public final void close()
Closes this InfoWindow by removing it from the DOM structure.


getContent_String

public final String getContent_String()
get content if its a string

Returns:
String

getContent_Node

public final Element getContent_Node()
get content if its a node

Returns:
Element

getPosition

public final LatLng getPosition()
get Position


getZindex

public final int getZindex()
get Z index


open

public final void open(MapWidget mapWidget)
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 the position property and optionally anchorPoint for calculating the pixelOffset (see InfoWindowOptions). The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

Parameters:
mapWidget -

open

public final void open(MapWidget mapWidget,
                       MVCObject<?> anchor)
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 the position property and optionally anchorPoint for calculating the pixelOffset (see InfoWindowOptions). The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

Parameters:
mapWidget -
anchor -

open

public final void open(StreetViewPanoramaWidget streetViewPanoRamaWidget)
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 the position property and optionally anchorPoint for calculating the pixelOffset (see InfoWindowOptions). The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

Parameters:
streetViewPanoRamaWidget -

open

public final void open(StreetViewPanoramaWidget streetViewPanoRamaWidget,
                       MVCObject<?> anchor)
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 the position property and optionally anchorPoint for calculating the pixelOffset (see InfoWindowOptions). The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow.

Parameters:
streetViewPanoRamaWidget -
anchor -

setContent

public final void setContent(Widget widget)

setContent

public final void setContent(String content)
set Content

Parameters:
content -

setContent

public final void setContent(Element element)
set Content

Parameters:
element -

setOptions

public final void setOptions(InfoWindowOptions options)
set Options

Parameters:
options -

setPosition

public final void setPosition(LatLng position)
set Position

Parameters:
position -

setZindex

public final void setZindex(int index)
set Z index

Parameters:
index -

addCloseClickHandler

public final HandlerRegistration addCloseClickHandler(CloseClickMapHandler handler)
This event is fired when the close button was clicked.

Parameters:
handler -

addContentChangeHandler

public final HandlerRegistration addContentChangeHandler(ContentChangeMapHandler handler)
This event is fired when the content property changes.

Parameters:
handler -

addDomReadyHandler

public final HandlerRegistration addDomReadyHandler(DomReadyMapHandler handler)
This event is fired when the <div> 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.

Parameters:
handler -

addPositionChangeHandler

public final HandlerRegistration addPositionChangeHandler(PositionChangeMapHandler handler)
This event is fired when the position property changes.

Parameters:
handler -

addZindexChangedHandler

public final HandlerRegistration addZindexChangedHandler(ZindexChangeMapHandler handler)
This event is fired when the InfoWindow's zIndex changes.

Parameters:
handler -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.