-
Notifications
You must be signed in to change notification settings - Fork 126
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
Feedback #20
Comments
|
Hi @ben-xD, you actually don't have to use turf here. The underlying data standard is GeoJSON. GeoJSON is itself based on JSON to represent geo data. So the GeoJSON that you want to inject into the CameraOptions(
center: {
"type": "Point",
"coordinates": [-80.1263, 25.7845]
}
// ...
),
// ... Or isolated: {
"type": "Point",
"coordinates": [-80.1263, 25.7845]
} What turf simply provides, is an optional to use class-object representation of GeoJSON. Check it out in the README of the turf library https://github.com/dartclub/turf_dart. The output of the The benefits of using turf with Mapbox can be static analysis and runtime checks, to make sure if the GeoJSON data structures are valid. |
A new data type
Though I totally see, that it would make sense to have more type information than just |
If we stick to using GeoJSON, won't we always have this problem? The 2 points mentioned in #20 (comment) can be ignored if we just drop the GeoJSON requirement. I think users would have a nicer time if they use types rather than need to create untyped JSONs. Why don't we use types provided by library? |
I added some feedback in a Github repo before this one was made public: motrieux-thomas/mapbox_maps_flutter-0.3.0#1 (comment).
I think it would be good to address them:
do
LatLng center;
Package documentation assumes people have
turf
(https://pub.dev/packages/turf) installed, since that is how they can doPosition(-80.1263, 25.7845)).toJson()
. This is kind of confusing, since docs don't mention turf. It would be good to avoid asking developers to instead turf though.Please consider renaming the controller type to
MapController
orMapboxController
. It's confusing that the map widget isMapWidget
, and the controller isMapboxMap
. The convention is to suffix names Controller if they are controllers.The text was updated successfully, but these errors were encountered: