001 package com.google.gwt.maps.client.panoramiolib;
002
003 import com.google.gwt.core.client.JavaScriptObject;
004 import com.google.gwt.maps.client.MapImpl;
005 import com.google.gwt.maps.client.MapWidget;
006
007 /**
008 * This object defines the properties that can be set on a PanoramioLayer object.
009 * <br><br>
010 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#PanoramioLayerOptions">PanoramioLayerOptions API Doc</a>
011 */
012 public class PanoramioLayerOptions extends JavaScriptObject {
013
014 /**
015 * This object defines the properties that can be set on a PanoramioLayer object.
016 */
017 public final static PanoramioLayerOptions newInstance() {
018 return JavaScriptObject.createObject().cast();
019 }
020
021 /**
022 * use newInstance();
023 */
024 protected PanoramioLayerOptions() {}
025
026 /**
027 * If true, the layer receives mouse events. Default value is true.
028 */
029 public final native boolean getClickable() /*-{
030 return this.clickable;
031 }-*/;
032
033 /**
034 * The map on which to display the layer.
035 */
036 public final MapWidget getMap() {
037 return MapWidget.newInstance(getMapImpl());
038 }
039
040 private final native MapImpl getMapImpl() /*-{
041 return this.map;
042 }-*/;
043
044 /**
045 * Suppress the rendering of info windows when layer features are clicked.
046 */
047 public final native boolean getSuppressInfoWindows() /*-{
048 return this.suppressInfoWindows;
049 }-*/;
050
051 /**
052 * A panoramio tag used to filter the photos which are displayed. Only photos which have been tagged with the supplied string will be shown.
053 */
054 public final native String getTag() /*-{
055 return this.tag;
056 }-*/;
057
058 /**
059 * A Panoramio user ID. If provided, only photos by this user will be displayed on the map. If both a tag and user ID are provided, the tag will take precedence.
060 */
061 public final native String getUserId() /*-{
062 return this.userId;
063 }-*/;
064
065 /**
066 * If true, the layer receives mouse events. Default value is true.
067 * @param clickable
068 */
069 public final native void setClickable(boolean clickable) /*-{
070 this.clickable = clickable;
071 }-*/;
072
073 /**
074 * The map on which to display the layer.
075 * @param mapWidget
076 */
077 public final void setMap(MapWidget mapWidget) {
078 setMapImpl(mapWidget.getJso());
079 }
080
081 private final native void setMapImpl(MapImpl map) /*-{
082 this.map = map;
083 }-*/;
084
085 /**
086 * Suppress the rendering of info windows when layer features are clicked.
087 * @param suppressInfoWindows
088 */
089 public final native void setSuppressInfoWindows(boolean suppressInfoWindows) /*-{
090 this.suppressInfoWindows = suppressInfoWindows;
091 }-*/;
092
093 /**
094 * A panoramio tag used to filter the photos which are displayed. Only photos which have been tagged with the supplied string will be shown.
095 * @param tag
096 */
097 public final native void setTag(String tag) /*-{
098 this.tag = tag;
099 }-*/;
100
101 /**
102 * A Panoramio user ID. If provided, only photos by this user will be displayed on the map. If both a tag and user ID are provided, the tag will take precedence.
103 * @param userId
104 */
105 public final native void setUserId(String userId) /*-{
106 this.userId = userId;
107 }-*/;
108
109 }