geopaparazzi / smash

Source code of the SMASH Android/iOS digital field mapping app.
https://www.geopaparazzi.org/smash/index.html
GNU General Public License v3.0
73 stars 26 forks source link

Zoom level indicator auto-update #243

Closed opk12 closed 10 months ago

opk12 commented 11 months ago

Do I understand correctly that the number at the bottom right is the zoom level? It does not change, when I pinch the slippy map to zoom in or zoom out. It should auto-update instead. But then I press the blue arrow at the bottom right (toggle menu bar icons) and it gets updated.

moovida commented 10 months ago

Hi @opk12 , yes it is the zoomlevel. Up to some time ago it was not possible in the flutter map lib to catch the pinch zoom event, so the number it connected to the zoom in and out buttons. I just saw that now some more events:

but still no pinch event. Adding these in the meanwhile to fix at least the double tap and the wheel scroll for desktop versions.

opk12 commented 10 months ago

Thank you. Is it fleaflet/flutter_map? If so, I opened this ticket for a generic zoom event API, which seems not to exist indeed in the class list, if it can help somehow

moovida commented 10 months ago

Great, thanks. When the event will be implemented, we can also move it to smash.

moovida commented 10 months ago

Hi @opk12 , for a different reason I ended up checking the MapEvents once more and found that there is a multi finger event that is redirected into a MapEventMove. So listening to that one made the zoom indicator finally work. I want to do some more testing on this, but seems to work nicely. Closing this for now.

opk12 commented 10 months ago

Thank you. FYI There's a gesture API restructuring in the works. https://github.com/fleaflet/flutter_map/issues/1715

moovida commented 10 months ago

Yep, thanks, I saw this and am not looking forward to migrate to flutter_map 5. Already 4 has been a pain. :-)