getWayId

fun getWayId(edgeId: Long): Expected<String, Long>

Provides the OSM way id for the given directed edge.

May perform blocking access to the on-device routing graph / tiles.

Return

OSM way id on success (including 0 when that is the real way id). On failure, the error string describes the reason (e.g. no graph reader, invalid id, missing tile).

Parameters

edgeId

Directed edge id


fun getWayId(geometry: LineString, startIndex: Int, endIndex: Int): Expected<String, List<Long>>

Provides the OSM way ids encountered along a polyline span, map-matched to the routing graph.

Returns an ordered list of distinct consecutive way ids along the matched path. On any failure the result is an error (e.g. no graph reader, invalid span, search failure, missing tile).

May perform blocking graph search and tile IO.

Parameters

geometry

LineString object representing the polyline span

startIndex

start index of the span (inclusive)

endIndex

end index of the span (exclusive); span must contain at least two points

Throws


fun getWayId(points: List<Point>, startIndex: Int = 0, endIndex: Int = points.size): Expected<String, List<Long>>

Provides the OSM way ids encountered along a polyline span, map-matched to the routing graph.

Returns an ordered list of distinct consecutive way ids along the matched path. On any failure the result is an error (e.g. no graph reader, invalid span, search failure, missing tile).

May perform blocking graph search and tile IO.

Parameters

points

a list of Point representing the polyline span

startIndex

start index of the span (inclusive). Defaults to 0

endIndex

end index of the span (exclusive). Defaults to the size of the points list

Throws