| java.lang.Object | |
| ↳ | com.steerpath.sdk.directions.DirectionsRequest.Builder |
Used for creating new DirectionsRequest objects.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Builder() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DirectionsRequest.Builder |
addDestination(Location end, String info)
Used for defining one or more destinations to which a route should be calculated.
| ||||||||||
| DirectionsRequest.Builder |
addDestination(double lat, double lon, int lvl, String info)
Convenience function to create a Location object with additional information
including level and user specified information.
| ||||||||||
| DirectionsRequest.Builder |
addDestination(Location end)
Add a destination to route to.
| ||||||||||
| DirectionsRequest |
build()
Create a new DirectionsRequest object based on the configuration done in the builder.
| ||||||||||
| DirectionsRequest.Builder |
setSource(double lat, double lon, int lvl, String info)
Convenience method for setting the start Location for this directions request.
| ||||||||||
| DirectionsRequest.Builder |
setSource(Location start)
Set the initial point for the route calculation.
| ||||||||||
| DirectionsRequest.Builder |
useAccessibility(boolean use)
When using accessibility mode, route avoids stairs and escalators.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Used for defining one or more destinations to which a route should be calculated.
| end | the end point to which the route should be calculated. |
|---|---|
| info | additional user specified string which will be stored in Location.setMetaData(). |
Convenience function to create a Location object with additional information
including level and user specified information.
If you add multiple destinations, the route calculation will be done to all the given destinations.
| lat | the latitude of this destination |
|---|---|
| lon | the longitude of this destination |
| lvl | the level of the this destination |
| info | any user specific information to be put in the Location object. |
Add a destination to route to. The extras of the destination should have the
LOCATION_LEVEL_KEY set, and may have the LOCATION_META_ID_KEY set.
If you add multiple destinations, the route calculation will be done to all the given destinations.
| end | the end Location of this route. |
|---|
Create a new DirectionsRequest object based on the configuration done in the builder. This is the way to obtain a DirectionsRequest object. Throws IllegalArgumentException if no source or destination is set.
Convenience method for setting the start Location for this directions request.
| lat | the latitude of the start point |
|---|---|
| lon | the longitude of the start point |
| lvl | the level of the start point |
| info | any user specific information to be put in the Location object. |
Set the initial point for the route calculation. The Location object will be returned in the solution, so if some meta information needs to be carried through, it can be done by placing it the extras read of the location. The level information if extracted from the LOCATION_LEVEL_KEY.
When using accessibility mode, route avoids stairs and escalators. Will use stairs and escalators if destination cannot be otherwise reached. Disabled by default.