PathNetwork

data class PathNetwork(pathGraph: PathGraph, projection: MapProjection)

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

Constructors

Link copied to clipboard
constructor(pathGraph: PathGraph, projection: MapProjection)

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

Computes a route from the given destination to the closest of the provided destination coordinates if such a route exists and returns null otherwise.

Computes a route from the given coordinates to the closest of the provided destination coordinates if such a route exists and returns null otherwise.