TrafficRouter
Interface for finding a route based on traffic data.
ru.dgis.sdk.NativeObject
fun findRoute(
startPoint: RouteSearchPoint,
finishPoint: RouteSearchPoint,
routeSearchOptions: RouteSearchOptions,
intermediatePoints: List<RouteSearchPoint> = listOf()
): Future<List<TrafficRoute>>
Looks for a route with the given parameters.
startPoint
RouteSearchPoint
Starting point of the route
finishPoint
RouteSearchPoint
The end point of the route
routeSearchOptions
RouteSearchOptions
Route search options
intermediatePoints
List<RouteSearchPoint>
Intermediate points to pass in the same order in which the points are given in the vector
Future<List<TrafficRoute>>
Future with a set of found routes, or throw a NativeException on failure.
An empty route set is a valid result, meaning that a route matching the specified search criteria cannot be found.
When searching for routes for freight transport, it is possible to return routes passing through the access zones for which passes were not provided, if it was not possible to route only through the access zones for which the passes were provided. To check if the list of passes is sufficient to pass a route, use the function route_matches_truck_pass_zone_passes.
fun findBriefRouteInfos(searchPoints: List<BriefRouteInfoSearchPoints>, routeSearchOptions: RouteSearchOptions): Future<List<BriefRouteInfo?>>
Searching for basic route information for a matching set of search points.
searchPoints
List<BriefRouteInfoSearchPoints>
A set of points for finding basic information about the route.
routeSearchOptions
Future<List<BriefRouteInfo?>>
Future with basic information about the set of routes corresponding to the set of search points, or throwing a NativeException on failure.
If the basic information for any of the pairs of points is not found, the element at the corresponding index in the returned result will be null.
val truckPassZonePasses
Returns a list of all supported passes that allow truck traffic within the pass zones.