New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Maps Web throws type error on adding polyline #65189
Comments
Hi @SirLink, |
Hello @darshankawar , sure
|
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Adding a Polyline to the map throws a type error
errors.dart:163 Uncaught (in promise) Error: Expected a value of type 'List<LatLng>', but got one of type 'List<dynamic>'
The problem seems to be in this code on Convert.dart line 321
points: rawPolyline['points'] ?.map((rawPoint) => LatLng.fromJson(rawPoint)) ?.toList(),
I managed to fix it by adding a type to the map and i can now see the polyline painted on the map, though it has a default color and i can't seem to be able to change it
points: rawPolyline['points'] ?.map<LatLng>((rawPoint) => LatLng.fromJson(rawPoint)) ?.toList(),
The text was updated successfully, but these errors were encountered: