DecodeUtils

Provides utilities to decode geometries of DirectionsRoutes and LegSteps. Results are cached for geometries of up to 3 DirectionsRoutes.

Functions

Link copied to clipboard
fun DirectionsRoute.completeGeometryToLineString(): LineString

Decodes geometry of a DirectionsRoute to a LineString and caches the result. No decoding is performed if there is already a cached result available.

Link copied to clipboard
fun DirectionsRoute.completeGeometryToPoints(): List<Point>

Decodes geometry of a DirectionsRoute to a List of Points and caches the result. No decoding is performed if there is already a cached result available.

Link copied to clipboard
fun DirectionsRoute.stepGeometryToLineString(legStep: LegStep): LineString

Decodes geometry of a LegStep in a DirectionsRoute to a LineString and caches the result. No decoding is performed if there is already a cached result available.

Link copied to clipboard
fun DirectionsRoute.stepGeometryToPoints(legStep: LegStep): List<Point>

Decodes geometry of a LegStep in a DirectionsRoute to a List of Points and caches the result. No decoding is performed if there is already a cached result available.

Link copied to clipboard
fun DirectionsRoute.stepsGeometryToLineString(): List<List<LineString>>

Decodes geometries of all LegSteps in a DirectionsRoute to LineStrings and caches the results. No decoding is performed for LegSteps, that already have a cached result available.

Link copied to clipboard
fun DirectionsRoute.stepsGeometryToPoints(): List<List<List<Point>>>

Decodes geometries of all LegSteps in a DirectionsRoute to Lists of Points and caches the results. No decoding is performed for LegSteps, that already have a cached result available.