com.google.gwt.maps.client.overlay
Class GeoXmlOverlay

java.lang.Object
  extended by com.google.gwt.maps.client.overlay.Overlay
      extended by com.google.gwt.maps.client.overlay.Overlay.ConcreteOverlay
          extended by com.google.gwt.maps.client.overlay.GeoXmlOverlay

public final class GeoXmlOverlay
extends Overlay.ConcreteOverlay

A map overlay containing geographic content from a publicly accessible GeoRSS XML or KML file.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.maps.client.overlay.Overlay
Overlay.ConcreteOverlay
 
Field Summary
 
Fields inherited from class com.google.gwt.maps.client.overlay.Overlay
jsoPeer
 
Method Summary
 LatLngBounds getDefaultBounds()
          Returns the bounding box of the default viewport.
 LatLng getDefaultCenter()
          Returns the center of the default viewport as a lat/lng.
 LatLng getDefaultSpan()
          Returns the span of the default viewport as a lat/lng.
 TileLayerOverlay getTileLayerOverlay()
          GeoXmlOverlay objects may create a tile overlay for optimization purposes in certain cases.
 void gotoDefaultViewport(MapWidget mapWidget)
          Sets the map's viewport to the default viewport of the XML file.
 boolean isHidden()
          Returns true if the GeoXmlOverlay object is currently hidden, as changed by the setVisible(boolean).
static void load(java.lang.String url, GeoXmlLoadCallback cb)
          Factory method to create a new overlay from a GeoRSS XML or KML file.
 void setVisible(boolean visible)
          Shows/Hides the child overlays created by the GeoXmlOverlay object if the overlay is both currently visible and the overlay's supportsHide() method returns true.
 boolean supportsHide()
          Always returns true.
 
Methods inherited from class com.google.gwt.maps.client.overlay.Overlay.ConcreteOverlay
copy, initialize, redraw, remove
 
Methods inherited from class com.google.gwt.maps.client.overlay.Overlay
getZIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static void load(java.lang.String url,
                        GeoXmlLoadCallback cb)
Factory method to create a new overlay from a GeoRSS XML or KML file. This provides a callback function that returns the new object when the load completes.

Parameters:
url - the URL of the XML or KML file to load
cb - the callback to invoke when loading completes.

getDefaultBounds

public LatLngBounds getDefaultBounds()
Returns the bounding box of the default viewport. This function should only be called after the file has been loaded.

Returns:
the bounding box of the default viewport.

getDefaultCenter

public LatLng getDefaultCenter()
Returns the center of the default viewport as a lat/lng. This function should only be called after the file has been loaded. (Since 2.84)

Returns:
point defined at the center of the viewport.

getDefaultSpan

public LatLng getDefaultSpan()
Returns the span of the default viewport as a lat/lng. This function should only be called after the file has been loaded.

Returns:
the span of the default viewport.

getTileLayerOverlay

public TileLayerOverlay getTileLayerOverlay()
GeoXmlOverlay objects may create a tile overlay for optimization purposes in certain cases. This method returns this tile layer overlay (if available). Note that the tile overlay may be null if not needed, or if the GeoXmlOverlay file has not yet finished loading.

Returns:
a handle to the TileLayerOverlay object

gotoDefaultViewport

public void gotoDefaultViewport(MapWidget mapWidget)
Sets the map's viewport to the default viewport of the XML file. (Since 2.84)

Parameters:
mapWidget - Map to adjust viewport of

isHidden

public boolean isHidden()
Returns true if the GeoXmlOverlay object is currently hidden, as changed by the setVisible(boolean). Otherwise returns false.

Returns:
true if the overlay is currently hidden.

setVisible

public void setVisible(boolean visible)
Shows/Hides the child overlays created by the GeoXmlOverlay object if the overlay is both currently visible and the overlay's supportsHide() method returns true. Note that this method will trigger the respective visibility changed event for each child overlay that fires that event. If no overlays are currently visible that return supportsHide() as true, this method has no effect.


supportsHide

public boolean supportsHide()
Always returns true.

Returns:
true