public class DirectionsRequest extends MapObject
Constructor and Description |
---|
DirectionsRequest()
Creates new DirectionsRequest object.
|
DirectionsRequest(Map map)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAvoidFerries()
Returns value of avoidFerries property.
|
boolean |
getAvoidHighways()
Returns value of avoidHighways property.
|
boolean |
getAvoidTolls()
Returns value of avoidTolls property.
|
LatLng |
getDestination()
Returns LatLng value of destination property.
|
java.lang.String |
getDestinationString()
Returns string value of destination property.
|
boolean |
getOptimizeWaypoints()
Returns value of optimizeWaypoints property.
|
LatLng |
getOrigin()
Returns LatLng value of origin property.
|
java.lang.String |
getOriginString()
Returns String value of origin property.
|
boolean |
getProvideRouteAlternatives()
Returns value of provideRouteAlternatives property.
|
java.lang.String |
getRegion()
Returns value of region property.
|
TransitOptions |
getTransitOptions()
Returns value of transitOptions property.
|
TravelMode |
getTravelMode()
Returns value of travelMode property.
|
UnitSystem |
getUnitSystem()
Returns value of unitSystem property.
|
DirectionsGeocodedWaypoint[] |
getWaypoints()
Returns value of waypoints property.
|
void |
setAvoidFerries(boolean value)
Sets new value for avoidFerries property.
|
void |
setAvoidHighways(boolean value)
Sets new value for avoidHighways property.
|
void |
setAvoidTolls(boolean value)
Sets new value for avoidTolls property.
|
void |
setDestination(LatLng destination)
Sets new LatLng value for destination property.
|
void |
setDestinationString(java.lang.String destination)
Sets new String value for destination property.
|
void |
setOptimizeWaypoints(boolean value)
Sets new value for optimizeWaypoints property.
|
void |
setOrigin(LatLng origin)
Sets new LatLng value for origin property.
|
void |
setOriginString(java.lang.String origin)
Sets new String value for origin property.
|
void |
setProvideRouteAlternatives(boolean value)
Sets new value for provideRouteAlternatives property.
|
void |
setRegion(java.lang.String value)
Sets new value for region property.
|
void |
setTransitOptions(TransitOptions options)
Sets new value for transitOptions property.
|
void |
setTravelMode(TravelMode mode)
Sets new value for travelMode property.
|
void |
setUnitSystem(UnitSystem value)
Sets new value for unitSystem property.
|
void |
setWaypoints(DirectionsGeocodedWaypoint[] waypoints)
Sets new value for waypoints property.
|
addEventListener, attachObject, cacheProperties, cacheProperties, clone, createJSValue, dispose, fromJSValue, getJSObject, getMap, getProperties, invokeMethod, propertyChanged, removeEventListener, updateProperty
public DirectionsRequest()
@Deprecated public DirectionsRequest(Map map)
map
- owner Map objectpublic LatLng getOrigin()
Location of origin. This can be specified as either a string to be geocoded or a LatLng. Required.
setOrigin(com.teamdev.jxmaps.LatLng)
public void setOrigin(LatLng origin)
origin
- new property valuegetOrigin()
public java.lang.String getOriginString()
setOriginString(java.lang.String)
public void setOriginString(java.lang.String origin)
origin
- new property valuegetOriginString()
public LatLng getDestination()
Location of destination. This can be specified as either a string to be geocoded or a LatLng. Required.
setDestinationString(java.lang.String)
public void setDestination(LatLng destination)
destination
- new property valuegetDestination()
public java.lang.String getDestinationString()
Location of destination. This can be specified as either a string to be geocoded or a LatLng. Required.
setDestinationString(java.lang.String)
public void setDestinationString(java.lang.String destination)
destination
- new property valuegetDestinationString()
public TravelMode getTravelMode()
Represents the type of routing requested. Required.
setTravelMode(com.teamdev.jxmaps.TravelMode)
public void setTravelMode(TravelMode mode)
mode
- new property valuegetTravelMode()
public boolean getAvoidFerries()
If true, instructs the Directions service to avoid ferries where possible. Optional.
setAvoidFerries(boolean)
public void setAvoidFerries(boolean value)
value
- new property valuegetAvoidFerries()
public boolean getAvoidHighways()
If true, instructs the Directions service to avoid highways where possible. Optional.
setAvoidHighways(boolean)
public void setAvoidHighways(boolean value)
value
- new property valuegetAvoidHighways()
public void setAvoidTolls(boolean value)
value
- new property valuegetAvoidTolls()
public boolean getAvoidTolls()
If true, instructs the Directions service to avoid toll roads where possible. Optional.
setAvoidTolls(boolean)
public boolean getOptimizeWaypoints()
If set to true, the DirectionService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order in the response to determine the new ordering.
setOptimizeWaypoints(boolean)
public void setOptimizeWaypoints(boolean value)
value
- new property valuegetOptimizeWaypoints()
public boolean getProvideRouteAlternatives()
Indicates whether or not route alternatives should be provided. Optional.
setProvideRouteAlternatives(boolean)
public void setProvideRouteAlternatives(boolean value)
value
- new property valuegetProvideRouteAlternatives()
public java.lang.String getRegion()
Represents the region code used as a bias for geocoding requests. Optional.
setRegion(java.lang.String)
public void setRegion(java.lang.String value)
value
- new property valuegetRegion()
public UnitSystem getUnitSystem()
Represents the preferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin.
setUnitSystem(com.teamdev.jxmaps.UnitSystem)
public void setUnitSystem(UnitSystem value)
value
- new property valuegetUnitSystem()
public TransitOptions getTransitOptions()
Represents the settings that apply only to requests where travelMode is TRANSIT. This object will have no effect for other travel modes.
setTransitOptions(com.teamdev.jxmaps.TransitOptions)
public void setTransitOptions(TransitOptions options)
options
- new property valuegetTransitOptions()
public DirectionsGeocodedWaypoint[] getWaypoints()
Collection of intermediate waypoints. Directions will be calculated from the origin to the destination by way of each waypoint in this array. The maximum allowed waypoints is 8, plus the origin, and destination. Maps API for Work customers are allowed 23 waypoints, plus the origin, and destination. Waypoints are not supported for transit directions. Optional.
setWaypoints(com.teamdev.jxmaps.DirectionsGeocodedWaypoint[])
public void setWaypoints(DirectionsGeocodedWaypoint[] waypoints)
waypoints
- new property valuegetWaypoints()