Skip to content
pubscout

google_polyline_algorithm

3.1.0, released 6 years ago by thisismarch.dev

Dart implementation of Google's Polyline Encoding lossy compression algorithm.

WASM-ready
$ flutter pub add google_polyline_algorithm
Source repository

What it does

Provides methods to encode a single coordinate, encode a list of coordinates into an encoded polyline string, and decode an encoded polyline string back into a list of coordinates.

AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to compress geographic coordinates for mapping APIs
  • You are working with Google's Polyline Encoding algorithm in Dart or Flutter

Skip it when

  • You require full routing or mapping services instead of just polyline compression

Strengths

  • Lightweight with no dependencies
  • Supports multiple platforms including Android, iOS, Web, Windows, macOS, and Linux

Weaknesses

  • Limited to a single specific algorithm implementation

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:google_polyline_algorithm/google_polyline_algorithm.dart';

final polyline = decodePolyline('_p~iF~ps|U_ulLnnqC_mqNvxq`@');
print(polyline);

Alternatives

Packages that do the same job and could replace google_polyline_algorithm.

Works with

Packages commonly used together with google_polyline_algorithm: ones it builds on, ones built on it, and its own family.