mapbox-maps-flutter
mapbox-maps-flutter copied to clipboard
A few observations
I'm sure there will be more, but after a week of working earnestly with this library:
- An object named ScreenCoordinate should store pixels, not latitude and longitude.
- Any object, regardless of name, storing latitude and longitude as x and y needs to instead store them as y and x.
- The MapboxMap should be able to report its visible area (e.g. screen size) in lat-lng or pixels.
- ==(Object other) => other is PointAnnotation && id == other.id, please.
- Implement OnPointAnnotationDragListener(PointAnnotation pa) so I don't have to implement my own.
Hi
I not agree on all your comments. Basically a Map library works with coordinates and distances, not with pixels. Of course we need somehow to know screen size in pixels and its relation to the map but nothing more.
Thanks
Walking through the example for the first time, I miss in my opinion the most obvious feature related to annotations.
Or maybe I'm missing something.
class AnnotationClickListener extends OnPointAnnotationClickListener {
@override
void onPointAnnotationClick(PointAnnotation annotation) {
print("onAnnotationClick, viewPoint: ${annotation.viewPoint}");
// display Dialog or PopupMenu at viewPoint
}
}
Hello there, @willipe53
If you do not mind my asking, from your usage of the mapbox_maps_flutter sdk, do you have a way to get the center coordinates of the visible map region?
Hello there, @willipe53
If you do not mind my asking, from your usage of the mapbox_maps_flutter sdk, do you have a way to get the center coordinates of the visible map region?
var coordinates = (await mapboxMap.getCameraState()).center["coordinates"];
Regarding to topic 3, I totally agree. It must be implemented after a while.
final CameraBounds bounds = await _controller.getBounds();