mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
245 stars 93 forks source link

Confusing names ( OnTapListener returning parameter type) #498

Closed Zer0xTJ closed 1 month ago

Zer0xTJ commented 1 month ago

On MapWidget there is a listener OnLongTapListener and OnTapListener, both returns ScreenCoordinates

i spent more that 2 hours discovering how to convert ScreenCoordinates to Position,

it will be very helpful to change the type to Position as the Listeners both returns the correct lng, and lat instead of Screen Pixels

evil159 commented 4 weeks ago

Hi @Zer0xTJ, thank you for raising this, indeed, the parameters carry geographical position rather than a touch point location on the screen. We've clarified this in https://github.com/mapbox/mapbox-maps-flutter/pull/473 which will be released as part of version 2.0.0.