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 calculateRoute(from: Destination, to: Collection<Destination>, options: PathNetwork.RouteOptions = RouteOptions()): RouteCalculationResult
Calculates a route from the given destination to the closest reachable of the provided destinations, or why there isn't one.
fun calculateRoute(from: GeographicCoordinate, to: Collection<GeographicCoordinate>, options: PathNetwork.RouteOptions = RouteOptions()): RouteCalculationResult
Calculates a route from the given coordinates to the closest reachable of the provided destination coordinates, or why there isn't one.