Skip to content

A flutter plugin that's decodes encoded google poly line string into list of geo-coordinates suitable for showing route/polyline on maps

License

Notifications You must be signed in to change notification settings

Dn-a/flutter_polyline_points

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_polyline_points

A flutter plugin that decodes encoded google polyline string into list of geo-coordinates suitable for showing route/polyline on maps

Getting Started

This package contains functions to decode google encoded polyline string which returns a list of co-ordinates indicating route between two geographical position

Usage

To use this package, add flutter_polyline_points as a dependency in your pubspec.yaml file.

Import the package

import 'package:flutter_polyline_points/flutter_polyline_points.dart';

First method

Get the list of points by Geo-coordinate

PolylinePoints polylinePoints = PolylinePoints();
List<PointLatLng> result = await polylinePoints.getRouteBetweenCoordinates(googleAPiKey,
        _originLatitude, _originLongitude, _destLatitude, _destLongitude);
print(result);

Second method

Decode an encoded google polyline string e.g _piFps|U_ulLnnqC_mqNvxq`@

List<PointLatLng> result = polylinePoints.decodePolyline("_p~iF~ps|U_ulLnnqC_mqNvxq`@");
print(result);

See the example directory for a complete sample app

About

A flutter plugin that's decodes encoded google poly line string into list of geo-coordinates suitable for showing route/polyline on maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 75.0%
  • Ruby 18.4%
  • Swift 3.3%
  • Java 3.0%
  • Objective-C 0.3%