Follow us on GitHub

com.google.gwt.maps.client.layers
Class KmlLayer

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.maps.client.layers.KmlLayer

public class KmlLayer
extends JavaScriptObject

A KmlLayer adds geographic markup to the map from a KML, KMZ or GeoRSS file that is hosted on a publicly accessible web server. A KmlFeatureData object is provided for each feature when clicked. This class extends MVCObject.

See KmlLayer API Doc


Constructor Summary
protected KmlLayer()
          use newInstance();
 
Method Summary
 HandlerRegistration addClickHandler(KmlMouseMapHandler handler)
          This event is fired when a feature in the layer is clicked.
 HandlerRegistration addDefaultViewportChangeHandler(DefaultViewportChangeMapHandler handler)
          This event is fired when the KML layers default viewport has changed.
 void close()
          erase kml layer
 LatLngBounds getDefaultViewport()
          Get the default viewport for the layer being displayed.
 MapWidget getMap()
          Get the map on which the KML Layer is being rendered.
 KmlLayerMetadata getMetadata()
          Get the metadata associated with this layer, as specified in the layer markup.
 String getUrl()
          Get the URL of the geographic markup which is being displayed.
static KmlLayer newInstance(String url)
          Creates a KmlLayer which renders the contents of the specified KML/KMZ file (KML API Doc) or GeoRSS file (GeoRSS API Doc).
static KmlLayer newInstance(String url, KmlLayerOptions options)
          Creates a KmlLayer which renders the contents of the specified KML/KMZ file (KML API Doc) or GeoRSS file (GeoRSS API Doc).
 void setMap(MapWidget mapWidget)
          Renders the KML Layer on the specified map.
 
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

KmlLayer

protected KmlLayer()
use newInstance();

Method Detail

newInstance

public static final KmlLayer newInstance(String url,
                                         KmlLayerOptions options)
Creates a KmlLayer which renders the contents of the specified KML/KMZ file (KML API Doc) or GeoRSS file (GeoRSS API Doc).

Parameters:
url -
options - KmlLayerOptions
Returns:
KmlLayerOptions

newInstance

public static final KmlLayer newInstance(String url)
Creates a KmlLayer which renders the contents of the specified KML/KMZ file (KML API Doc) or GeoRSS file (GeoRSS API Doc).

Parameters:
url -

getDefaultViewport

public final LatLngBounds getDefaultViewport()
Get the default viewport for the layer being displayed.


setMap

public final void setMap(MapWidget mapWidget)
Renders the KML Layer on the specified map. If map is set to null, the layer is removed.

Parameters:
mapWidget -

getMap

public final MapWidget getMap()
Get the map on which the KML Layer is being rendered.


getMetadata

public final KmlLayerMetadata getMetadata()
Get the metadata associated with this layer, as specified in the layer markup.


getUrl

public final String getUrl()
Get the URL of the geographic markup which is being displayed.


addClickHandler

public final HandlerRegistration addClickHandler(KmlMouseMapHandler handler)
This event is fired when a feature in the layer is clicked.

Parameters:
handler -

addDefaultViewportChangeHandler

public final HandlerRegistration addDefaultViewportChangeHandler(DefaultViewportChangeMapHandler handler)
This event is fired when the KML layers default viewport has changed.

Parameters:
handler -

close

public final void close()
erase kml layer



Follow us on GitHub

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