com.mapitz.gwt.googleMaps.client
Class GOverlay

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.mapitz.gwt.googleMaps.client.GOverlay
Direct Known Subclasses:
GInfoWindow, GMarker, GPolyline

public class GOverlay
extends com.google.gwt.core.client.JavaScriptObject

This interface is implemented by the GMarker, GPolyline, and GInfoWindow classes in the maps API library. You can implement it if you want to display custom types of overlay objects on the map. An instance of GOverlay can be put on the map with the method GMap2.addOverlay(). The map will then call the method GOverlay.initialize() on the overlay instance to display itself on the map initially. Whenever the map display changes, the map will call GOverlay.redraw() so that the overlay can reposition itself if necessary. The overlay instance can use the method GMap2.getPane() to get hold of one or more DOM container elements to attach itself to.

Author:
aglaforge

Method Summary
 GOverlay Copy()
          copy() GOverlay Returns an uninitialized copy of itself that can be added to the map.
static double GetZIndex(double latitude)
          Returns a CSS z-index value for a given latitude.
 void Initialize(GMap2 map)
          initialize(map) none Called by the map after the overlay is added to the map using GMap2.addOverlay().
 void Redraw(boolean force)
          redraw(force) none Called by the map when the map display has changed.
 void Remove()
          remove() none Called by the map after the overlay is removed from the map using GMap2.removeOverlay() or GMap2.clearOverlays().
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

GetZIndex

public static double GetZIndex(double latitude)
Returns a CSS z-index value for a given latitude. It computes a z index such that overlays further south are on top of overlays further north, thus creating the 3D appearance of marker overlays

Parameters:
latitude -
Returns:

Initialize

public void Initialize(GMap2 map)
initialize(map) none Called by the map after the overlay is added to the map using GMap2.addOverlay(). The overlay object can draw itself into the different panes of the map that can be obtained using GMap2.getPane().

Parameters:
self -
map -

Remove

public void Remove()
remove() none Called by the map after the overlay is removed from the map using GMap2.removeOverlay() or GMap2.clearOverlays(). The overlay must remove itself from the map panes here.


Copy

public GOverlay Copy()
copy() GOverlay Returns an uninitialized copy of itself that can be added to the map.

Returns:

Redraw

public void Redraw(boolean force)
redraw(force) none Called by the map when the map display has changed. The argument force will be true if the zoom level or the pixel offset of the map view has changed, so that the pixel coordinates need to be recomputed.

Parameters:
force -