|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJavaScriptObject
com.google.maps.gwt.client.MVCObject
com.google.maps.gwt.client.OverlayView
public class OverlayView
You can implement this class if you want to display custom types of overlay objects on the map. THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
Constructor Summary | |
---|---|
protected |
OverlayView()
Protected constructor avoids default public constructor. |
Method Summary | |
---|---|
static OverlayView |
create()
You should inherit from this class by setting your overlay's prototype to new OverlayView.prototype
. |
void |
draw()
Implement this method to draw or update the overlay. |
GoogleMap |
getMap()
|
MapPanes |
getPanes()
Returns the panes in which this OverlayView can be rendered. |
MapCanvasProjection |
getProjection()
Returns the MapCanvasProjection
object associated with this
OverlayView
. |
void |
onAdd()
Implement this method to initialize the overlay DOM elements. |
void |
onRemove()
Implement this method to remove your elements from the DOM. |
void |
setMap(GoogleMap map)
Adds the overlay to the map or panorama. |
void |
setMap(StreetViewPanorama map)
Adds the overlay to the map or panorama. |
Methods inherited from class com.google.maps.gwt.client.MVCObject |
---|
bindTo, bindTo, bindTo, bindTo, changed, get, notify, set, setValues, setValues, unbind, unbindAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected OverlayView()
Method Detail |
---|
public static OverlayView create()
new OverlayView.prototype
. You must implement three methods: onAdd(), draw(), and onRemove().
In the add() method, you should create DOM objects and append them
as children of the panes. In the draw() method, you should position
these elements. In the onRemove() method, you should remove the
objects from the DOM. You must call setMap() with a valid Map object
to trigger the call to the onAdd() method and setMap(null) in order
to trigger the onRemove() method. The setMap() method can be called
at the time of construction or at any point afterward when the
overlay should be re-shown after removing. The draw() method will
then be called whenever a map property changes that could change the
position of the element, such as zoom, center, or map type.
public final void draw()
public final GoogleMap getMap()
public final MapPanes getPanes()
public final MapCanvasProjection getProjection()
MapCanvasProjection
object associated with this
OverlayView
. Only available after draw has been called.
public final void onAdd()
public final void onRemove()
public final void setMap(GoogleMap map)
public final void setMap(StreetViewPanorama map)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |