PathCompressionUtils class

Utility methods for optional path compression and polyline conversion.

Constructors

PathCompressionUtils()
Creates a path compression utility instance.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

compressPath(List<LatLng> path, {required double minimumDistanceMeters, required double simplificationToleranceMeters, required int precision, List<LatLng> preservePoints = const []}) → PathCompressionResult
Filters, simplifies, rounds, and encodes a raw list of path coordinates.
compressPathModel(PathModel pathModel, {required double minimumDistanceMeters, required double simplificationToleranceMeters, required int precision}) → EncodedPathModel
Compresses a saved PathModel and returns an EncodedPathModel.
decodePolyline(String encodedPath, {int precision = 5}) → List<LatLng>
Decodes a polyline string back into path coordinates.
encodePolyline(List<LatLng> path, {int precision = 5}) → String
Encodes path into a Google-style polyline string.
resolvePath(EncodedPathModel encodedPathModel) → List<LatLng>
Decodes the route inside encodedPathModel back into a coordinate list.