001 package com.google.gwt.maps.client.layers;
002
003 import com.google.gwt.core.client.JavaScriptObject;
004 import com.google.gwt.core.client.JsArray;
005 import com.google.gwt.maps.client.MapImpl;
006 import com.google.gwt.maps.client.MapWidget;
007
008 /**
009 * This object defines the properties that can be set on a FusionTablesLayer object.
010 * <br><br>
011 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#FusionTablesLayerOptions">FusionTablesLayerOptions API Doc</a>
012 */
013 public class FusionTablesLayerOptions extends JavaScriptObject {
014
015 /**
016 * use newInstance();
017 */
018 protected FusionTablesLayerOptions() {}
019
020 /**
021 * creates - This object defines the properties that can be set on a FusionTablesLayer object.
022 */
023 public static final FusionTablesLayerOptions newInstance() {
024 return JavaScriptObject.createObject().cast();
025 }
026
027 /**
028 * sets If true, the layer receives mouse events. Default value is true.
029 * @param clickable
030 */
031 public final native void setClickable(boolean clickable) /*-{
032 this.clickable = clickable;
033 }-*/;
034
035 /**
036 * gets If true, the layer receives mouse events. Default value is true.
037 */
038 public final native boolean getClickable() /*-{
039 return this.clickable;
040 }-*/;
041
042 /**
043 * sets Options which define the appearance of the layer as a heatmap.
044 * @param heatmap
045 */
046 public final native void setHeatmap(FusionTableHeatmap heatmap) /*-{
047 this.heatmap = heatmap;
048 }-*/;
049
050 /**
051 * gets Options which define the appearance of the layer as a heatmap.
052 */
053 public final native FusionTableHeatmap getHeatmap() /*-{
054 return this.heatmap;
055 }-*/;
056
057 /**
058 * Renders the layer on the specified map. If map is set to null, the layer will be removed.
059 * @param mapWidget
060 */
061 public final void setMap(MapWidget mapWidget) {
062 setMapImpl(mapWidget.getJso());
063 }
064
065 private final native void setMapImpl(MapImpl map) /*-{
066 this.map = map;
067 }-*/;
068
069 /**
070 * Returns the map on which this layer is displayed.
071 */
072 public final MapWidget getMap() {
073 return MapWidget.newInstance(getMapImpl());
074 }
075
076 private final native MapImpl getMapImpl() /*-{
077 return this.map;
078 }-*/;
079
080 /**
081 * sets Options defining the data to display.
082 * @param query
083 */
084 public final native void setQuery(FusionTablesQuery query) /*-{
085 this.query = query;
086 }-*/;
087
088 /**
089 * gets Options defining the data to display.
090 */
091 public final native FusionTablesQuery getQuery() /*-{
092 return this.query;
093 }-*/;
094
095 /**
096 * sets An array of up to 5 style specifications, which control the appearance of features within the layer.
097 * @param styles
098 */
099 public final native void setStyles(JsArray<FusionTablesStyle> styles) /*-{
100 this.styles = styles;
101 }-*/;
102
103 /**
104 * gets An array of up to 5 style specifications, which control the appearance of features within the layer.
105 */
106 public final native JsArray<FusionTablesStyle> getStyles() /*-{
107 return this.styles;
108 }-*/;
109
110 /**
111 * sets Suppress the rendering of info windows when layer features are clicked.
112 * @param suppressInfoWindows
113 */
114 public final native void setSuppressInfoWindows(boolean suppressInfoWindows) /*-{
115 this.suppressInfoWindows = suppressInfoWindows;
116 }-*/;
117
118 /**
119 * gets Suppress the rendering of info windows when layer features are clicked.
120 */
121 public final native boolean getSuppressInfoWindows() /*-{
122 return this.suppressInfoWindows;
123 }-*/;
124
125 }