Package es.situm.sdk.directions
Interface DirectionsManager
-
public interface DirectionsManager
Allows route calculation between two points, usually from current user's location.Codes of all
Error
s returned by this manager are declared inCommonErrorConstant.Code
andDirectionsManager.Code
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DirectionsManager.Code
The error codes received inHandler.onFailure(Error)
on theDirectionsManager
static interface
DirectionsManager.PropertyKey
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
requestDirections(DirectionsRequest request, Handler<Route> callback)
Calculates a route between two points.
-
-
-
Method Detail
-
requestDirections
boolean requestDirections(@NonNull DirectionsRequest request, @NonNull Handler<Route> callback) throws java.lang.IllegalArgumentException
Calculates a route between two points. The result is provided asynchronously using thecallback
.- Parameters:
request
- non-null search parameters. 'from' and 'to' can't be null, and points have to be inside the same building. If the origin bearing is unknown 'bearingFrom' should be null.callback
- object used to provide the result. Errors are declared inCommonErrorConstant.Code
andDirectionsManager.Code
- Returns:
- true if the async calculus has started correctly. False otherwise.
- Throws:
java.lang.IllegalArgumentException
- some required argument is null, orrequest
's points (DirectionsRequest.getTo()
,DirectionsRequest.getFrom()
) are not in the same building.
-
-