Gives polyline coordinates to set polylines in Google Map.
Flutter plugin to retrieve coordinates (in latitude and longitude) to draw the polylines (Route) in
This package made with the inspiration of
To use this plugin, add
google_map_polyline as a dependency in your pubspec.yaml file.
- First you need to create object using your Google Maps API key.
Get an API key at https://cloud.google.com/maps-platform/. (This plugin only requires Directions API.)
GoogleMapPolyline googleMapPolyline = new GoogleMapPolyline(apiKey: "YOUR KEY HERE");
- Now you may able retrieve coordinates for the Polyline route.
- Get the Polyline coordinates using location coordinates (latitude and longitude)
await googleMapPolyline.getCoordinatesWithLocation( origin: LatLng(40.677939, -73.941755), destination: LatLng(40.698432, -73.924038), mode: RouteMode.driving);
- Get the Polyline coordinates using address of the location
await googleMapPolyline.getPolylineCoordinatesWithAddress( origin: '55 Kingston Ave, Brooklyn, NY 11213, USA', destination: '8007 Cypress Ave, Glendale, NY 11385, USA', mode: RouteMode.driving);
xCoordinates with Location Coordinates (Latitude and Longitude)
xCoordinates with Location Address
Feature Requests and Issues
Please file feature requests and bugs at the issue tracker.
- Foreign Function Interface for interoperability with the C programming language. [...]
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.