001 package com.google.gwt.maps.client.services;
002
003 import com.google.gwt.core.client.JavaScriptObject;
004 import com.google.gwt.maps.client.base.LatLng;
005
006 /**
007 * A DirectionsWaypoint represents a location between origin and destination through which the trip should be routed.
008 * <br><br>
009 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#DirectionsWaypoint">DirectionsWaypoint API Doc</a>
010 */
011 public class DirectionsWaypoint extends JavaScriptObject {
012
013 /**
014 * use newInstance();
015 */
016 protected DirectionsWaypoint() {}
017
018 /**
019 * A DirectionsWaypoint represents a location between origin and destination through which the trip should be routed.
020 */
021 public static final DirectionsWaypoint newInstance() {
022 return JavaScriptObject.createObject().cast();
023 }
024
025 /**
026 * Waypoint location. Can be an address string or LatLng. Optional.
027 * @param location
028 */
029 public final native void setLocation(String location) /*-{
030 this.location = location;
031 }-*/;
032
033 /**
034 * Waypoint location. Can be an address string or LatLng. Optional.
035 */
036 public final native String getLocation_String() /*-{
037 return this.location;
038 }-*/;
039
040 /**
041 * Waypoint location. Can be an address string or LatLng. Optional.
042 * @param location
043 */
044 public final native void setLocation(LatLng location) /*-{
045 this.location = location;
046 }-*/;
047
048 /**
049 * Waypoint location. Can be an address string or LatLng. Optional.
050 */
051 public final native LatLng getLocation_LatLng() /*-{
052 return this.location;
053 }-*/;
054
055 /**
056 * If true, indicates that this waypoint is a stop between the origin and destination. This has the effect of splitting the route into two. This value is true by default. Optional.
057 * @param stopover
058 */
059 public final native void setStopOver(boolean stopover) /*-{
060 this.stopover = stopover;
061 }-*/;
062
063 /**
064 * If true, indicates that this waypoint is a stop between the origin and destination. This has the effect of splitting the route into two. This value is true by default. Optional.
065 */
066 public final native boolean getStopOver() /*-{
067 return this.stopover;
068 }-*/;
069
070 }