Skip to content
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

API v2 with turf conflicts with internal Mapbox classes #606

Open
jaumard opened this issue Jul 4, 2024 · 0 comments
Open

API v2 with turf conflicts with internal Mapbox classes #606

jaumard opened this issue Jul 4, 2024 · 0 comments

Comments

@jaumard
Copy link

jaumard commented Jul 4, 2024

I have migrated from v1 to v2 and now I have class mismatch errors all over the place.

Look like Mapbox sdk is having it's own Point class that extends turf Point. Which is fine I guess.

But the issue is that if I use FeatureCollection.fromJson(jsonDecode(data) as Map<String, dynamic>); as FeatureCollection is not a class from Mapbox but from (geotype but let's say turf) then when I try to to pass this featureCollection back to Mapbox is fails with the following error:

type 'Point' is not a subtype of type 'Point' in type cast where
  Point is from package:geotypes/src/geojson.dart
  Point is from package:mapbox_maps_flutter/mapbox_maps_flutter.dart

v2 is currently not usable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant