using flutter_polyline_points 0.2.4 not working but 0.1.0 works
115
Use PointLatLng()
when passing LatLng values to the getRouteBetweenCoordinates()
method. For example:
List<PointLatLng> result = await polylinePoints?.getRouteBetweenCoordinates(
googleAPIKey,
PointLatLng(sourceLocatioon.latitude, sourceLocatioon.longitude),
PointLatLng(destLocatioon.latitude, destLocatioon.longitude)
);
The new PointLatLng
method is included in flutter_polyline_points: 0.2.4
package that is used for passing in the origin and destination coordinates. Check the package sample here.
Author by
michaelmjous
Updated on December 26, 2022Comments
-
michaelmjous over 1 year
i upgraded my pub file and updated my flutter_polyline_points dependency from 0.1.0 to 0.2.4 had error saying this method accepts only 3 parameters and am making use of 5.
List<PointLatLng> result = await polylinePoints?.getRouteBetweenCoordinates( googleAPIKey, sourceLocatioon.latitude, sourceLocatioon.longitude, destLocatioon.latitude, destLocatioon.longitude );
but it works in flutter_polyline_points 0.1.0
-
michaelmjous over 3 yearsThanks the package sample also helped
-
jabamataro over 3 yearsGlad that helped!