PathNetwork
A PathNetwork represents the routing graph for a map, containing vertices and edges that define possible paths for navigation. It provides methods to calculate optimal routes between locations while respecting routing options.
Since
0.0.86
Types
Link copied to clipboard
data class RouteOptions(val avoidFlags: Set<String> = setOf(), val attachEndpointsToAllowedPathsOnly: Boolean = false, val originSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED, val destinationSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED)
Configuration options for route calculation.
Functions
Link copied to clipboard
fun calculateDirections(from: Destination, to: Collection<Destination>, options: PathNetwork.RouteOptions = RouteOptions()): Route?
Computes a route from the given destination to the closest of the provided destination coordinates if such a route exists and returns null otherwise.
fun calculateDirections(from: GeographicCoordinate, to: Collection<GeographicCoordinate>, options: PathNetwork.RouteOptions = RouteOptions()): Route?
Computes a route from the given coordinates to the closest of the provided destination coordinates if such a route exists and returns null otherwise.