flexible_polyline 1.0.0-alpha copy "flexible_polyline: ^1.0.0-alpha" to clipboard
flexible_polyline: ^1.0.0-alpha copied to clipboard

Flexible Polyline encoder and decoder for representing a list of GPS coordinates (and optional elevation) into a compressed URL-safe string.

Flexible Polyline encoder/decoder for Dart #

The flexible polyline encoding is a lossy compressed representation of a list of coordinate pairs or coordinate triples.

For more information see the github repo.

Usage #

Encoding #

List<LatLngZ> pairs = List<LatLngZ>();
pairs.add(LatLngZ(50.1022829, 8.6982122));
pairs.add(LatLngZ(50.1020076, 8.6956695));
pairs.add(LatLngZ(50.1006313, 8.6914960));
pairs.add(LatLngZ(50.0987800, 8.6875156));

String encoded = FlexiblePolyline.encode(pairs /* coordinates */,
	5 /* coordinate precision */, ThirdDimension.ABSENT /* third dimension */,
	0 /* third dimension precision */);

// encoded == 'BFoz5xJ67i1B1B7PzIhaxL7Y'

Decoding #

List<LatLngZ> decoded =
    FlexiblePolyline.decode("BFoz5xJ67i1B1B7PzIhaxL7Y");

/*
decoded == [
	LatLngZ(50.10228, 8.69821),
	LatLngZ(50.10201, 8.69567),
	LatLngZ(50.10063, 8.69150),
	LatLngZ(50.09878, 8.68752),
]
*/
4
likes
10
pub points
30%
popularity

Publisher

unverified uploader

Flexible Polyline encoder and decoder for representing a list of GPS coordinates (and optional elevation) into a compressed URL-safe string.

Homepage
Repository (GitHub)
View/report issues

Dependencies

path, tuple

More

Packages that depend on flexible_polyline