kb0 / maps_toolkit

Dart library for area, distance, heading measurements
Apache License 2.0
46 stars 17 forks source link

The argument type 'LatLong' can't be assigned to the parameter type 'LatLng' #15

Closed nalnir closed 3 years ago

nalnir commented 3 years ago

I've seen a similar issue here that is marked as closed but I am not able to solve this. I use google_maps_flutter that uses LatLong class for latitude and longitude. This package uses LatLng class for latitude and longitude.

Because of this a lot of functionalities are incompatible. So for example if I want to use: PolygonUtil.isLocationOnPath(point, polyline, geodesic) It expects LatLng for point and the List of LatLng of polylines. Because I'm getting LatLong from google_maps_flutter I get the error: The argument type 'LatLong' can't be assigned to the parameter type 'LatLng'.

Is there way to transform LatLong to LatLng and vice-versa?

nalnir commented 3 years ago

I was successfully able to transform LatLong to mp.LatLng type so the issue is solved and now I am able to use the functionality.