mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

A few observations

Open willipe53 opened this issue 1 year ago • 5 comments

I'm sure there will be more, but after a week of working earnestly with this library:

  1. An object named ScreenCoordinate should store pixels, not latitude and longitude.
  2. Any object, regardless of name, storing latitude and longitude as x and y needs to instead store them as y and x.
  3. The MapboxMap should be able to report its visible area (e.g. screen size) in lat-lng or pixels.
  4. ==(Object other) => other is PointAnnotation && id == other.id, please.
  5. Implement OnPointAnnotationDragListener(PointAnnotation pa) so I don't have to implement my own.

willipe53 avatar Sep 29 '23 12:09 willipe53

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

securexperts avatar Oct 08 '23 19:10 securexperts

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
  }
}

xinoxapps avatar Oct 26 '23 07:10 xinoxapps

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?

jimvandijk avatar Dec 19 '23 14:12 jimvandijk

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"];

willipe53 avatar Dec 19 '23 16:12 willipe53

Regarding to topic 3, I totally agree. It must be implemented after a while.

final CameraBounds bounds = await _controller.getBounds();

gorkemhacioglu avatar May 10 '24 00:05 gorkemhacioglu