001    package com.google.gwt.maps.client.layers;
002    
003    import com.google.gwt.core.client.JavaScriptObject;
004    
005    /**
006     * Data for a single KML feature in JSON format, returned when a KML feature is clicked. The data contained in this object mirrors that associated with the feature in the KML or GeoRSS markup in which it is declared.
007     */
008    public class KmlFeatureData extends JavaScriptObject {
009      
010      /**
011       * This is created from an event.
012       * use newInstance();
013       */
014      protected KmlFeatureData() {}
015      
016      /**
017       * this is created from an event
018       */
019      public static final KmlFeatureData newInstance() {
020        return JavaScriptObject.createObject().cast();
021      }
022      
023      /**
024       * The feature's <atom:author>, extracted from the layer markup (if specified).
025       * @param author
026       */
027      public final native void setAuthor(KmlAuthor author) /*-{
028        this.author = author;
029      }-*/;
030      
031      /**
032       * The feature's <atom:author>, extracted from the layer markup (if specified).
033       */
034      public final native KmlAuthor getAuthor() /*-{
035        return this.author;
036      }-*/;
037      
038      /**
039       * The feature's <description>, extracted from the layer markup.
040       * @param description
041       */
042      public final native void setDescription(String description) /*-{
043        this.description = description;
044      }-*/;
045      
046      /**
047       * The feature's <description>, extracted from the layer markup.
048       */
049      public final native String getDescription() /*-{
050        return this.description;
051      }-*/;
052      
053      /**
054       * The feature's <id>, extracted from the layer markup. If no <id> has been specified, a unique ID will be generated for this feature.
055       * @param id
056       */
057      public final native void setId(String id) /*-{
058        this.id = id;
059      }-*/;
060      
061      /**
062       * The feature's <id>, extracted from the layer markup. If no <id> has been specified, a unique ID will be generated for this feature.
063       */
064      public final native String getId() /*-{
065        return this.id;
066      }-*/;
067      
068      /**
069       * The feature's balloon styled text, if set.
070       * @param infoWindowHtml
071       */
072      public final native void setInfoWindowHtml(String infoWindowHtml) /*-{
073        this.infoWindowHtml = infoWindowHtml;
074      }-*/;
075      
076      /**
077       * The feature's balloon styled text, if set.
078       */
079      public final native String getInfoWindowHtml() /*-{
080        return this.infoWindowHtml;
081      }-*/;
082      
083      /**
084       * The feature's <name>, extracted from the layer markup.
085       * @param name
086       */
087      public final native void setName(String name) /*-{
088        this.name = name;
089      }-*/;
090      
091      /**
092       * The feature's <name>, extracted from the layer markup.
093       */
094      public final native String getName() /*-{
095        return this.name;
096      }-*/;
097      
098      /**
099       * The feature's <Snippet>, extracted from the layer markup.
100       * @param snippet
101       */
102      public final native void setSnippet(String snippet) /*-{
103        this.snippet = snippet;
104      }-*/;
105      
106      /**
107       * The feature's <Snippet>, extracted from the layer markup.
108       */
109      public final native String getSnippet() /*-{
110        return this.snippet;
111      }-*/;
112    
113      /**
114       * get to this object json string
115       */
116      public final native String getToString() /*-{
117        return this.toSource ? this.toSource() : "NO SOURCE";
118      }-*/;
119    }