com.google.maps.gwt.client
Class KmlLayer

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

public class KmlLayer
extends MVCObject

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 SOURCE CODE IS GENERATED, DO NOT MODIFY


Nested Class Summary
static interface KmlLayer.ClickHandler
          This event is fired when a feature in the layer is clicked.
static interface KmlLayer.DefaultviewportChangedHandler
          This event is fired when the KML layers default viewport has changed.
static interface KmlLayer.StatusChangedHandler
          This event is fired when the KML layer has finished loading.
 
Constructor Summary
protected KmlLayer()
          Protected constructor avoids default public constructor.
 
Method Summary
 void addClickListener(KmlLayer.ClickHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addClickListenerOnce(KmlLayer.ClickHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addDefaultviewportChangedListener(KmlLayer.DefaultviewportChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addDefaultviewportChangedListenerOnce(KmlLayer.DefaultviewportChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void addStatusChangedListener(KmlLayer.StatusChangedHandler handler)
          Adds the given listener function to the given event name for the given object instance.
 void addStatusChangedListenerOnce(KmlLayer.StatusChangedHandler handler)
          Like addListener, but the handler removes itself after handling the first event.
 void clearClickListeners()
          Removes all listeners for the given event for the given instance.
 void clearDefaultviewportChangedListeners()
          Removes all listeners for the given event for the given instance.
 void clearInstanceListeners()
          Removes all listeners for all events for the given instance.
 void clearStatusChangedListeners()
          Removes all listeners for the given event for the given instance.
static KmlLayer create(java.lang.String url)
          Creates a KmlLayer which renders the contents of the specified KML/KMZ file (https://developers.google.com/km l/documentation/kmlreference) or GeoRSS file (http://www.georss.org).
static KmlLayer create(java.lang.String url, KmlLayerOptions opts)
          Creates a KmlLayer which renders the contents of the specified KML/KMZ file (https://developers.google.com/km l/documentation/kmlreference) or GeoRSS file (http://www.georss.org).
 LatLngBounds getDefaultViewport()
          Get the default viewport for the layer being displayed.
 GoogleMap 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.
 KmlLayerStatus getStatus()
          Get the status of the layer, set once the requested document has loaded.
 java.lang.String getUrl()
          Get the URL of the geographic markup which is being displayed.
 void setMap(GoogleMap map)
          Renders the KML Layer on the specified map.
 void triggerClick(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerDefaultviewportChanged(JavaScriptObject... varargs)
          Triggers the given event.
 void triggerStatusChanged(JavaScriptObject... varargs)
          Triggers the given event.
 
Methods inherited from class com.google.maps.gwt.client.MVCObject
bindTo, bindTo, bindTo, bindTo, changed, create, 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

KmlLayer

protected KmlLayer()
Protected constructor avoids default public constructor.

Method Detail

create

public static KmlLayer create(java.lang.String url,
                              KmlLayerOptions opts)
Creates a KmlLayer which renders the contents of the specified KML/KMZ file (https://developers.google.com/km l/documentation/kmlreference) or GeoRSS file (http://www.georss.org).


create

public static KmlLayer create(java.lang.String url)
Creates a KmlLayer which renders the contents of the specified KML/KMZ file (https://developers.google.com/km l/documentation/kmlreference) or GeoRSS file (http://www.georss.org).


addClickListener

public final void addClickListener(KmlLayer.ClickHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addClickListenerOnce

public final void addClickListenerOnce(KmlLayer.ClickHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addDefaultviewportChangedListener

public final void addDefaultviewportChangedListener(KmlLayer.DefaultviewportChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addDefaultviewportChangedListenerOnce

public final void addDefaultviewportChangedListenerOnce(KmlLayer.DefaultviewportChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


addStatusChangedListener

public final void addStatusChangedListener(KmlLayer.StatusChangedHandler handler)
Adds the given listener function to the given event name for the given object instance. Returns an identifier for this listener that can be used with removeListener().


addStatusChangedListenerOnce

public final void addStatusChangedListenerOnce(KmlLayer.StatusChangedHandler handler)
Like addListener, but the handler removes itself after handling the first event.


clearClickListeners

public final void clearClickListeners()
Removes all listeners for the given event for the given instance.


clearDefaultviewportChangedListeners

public final void clearDefaultviewportChangedListeners()
Removes all listeners for the given event for the given instance.


clearInstanceListeners

public final void clearInstanceListeners()
Removes all listeners for all events for the given instance.


clearStatusChangedListeners

public final void clearStatusChangedListeners()
Removes all listeners for the given event for the given instance.


getDefaultViewport

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


getMap

public final GoogleMap 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.


getStatus

public final KmlLayerStatus getStatus()
Get the status of the layer, set once the requested document has loaded.


getUrl

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


setMap

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


triggerClick

public final void triggerClick(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerDefaultviewportChanged

public final void triggerDefaultviewportChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.


triggerStatusChanged

public final void triggerStatusChanged(JavaScriptObject... varargs)
Triggers the given event. All arguments after eventName are passed as arguments to the listeners.