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

onTapListener doesn't work after adding GeoJsonSource to a SymbolLayer.

Open mahdidahouei opened this issue 1 year ago • 4 comments

I'm using mapbox to show a large number of symbols using GeoJson source. I want the symbols to be selected when users taps on them. but onTapListener callback isn't called when there is symbol layer on map. I've implement the select functionality inside onLongTapListener listener and it works perfectly even when there is symbol layer on map but onTapListener doesn't work!

mahdidahouei avatar Nov 30 '24 15:11 mahdidahouei

I figured out that this only doesn't work on android. It works on ios correctly

mahdidahouei avatar Dec 06 '24 21:12 mahdidahouei

I am also facing same problem. Only on Android when shaded region (inside Polygona) is clicked onTapListener is not working. But works when outside is clicked. on iOS we do not have nay problem it works fine.

hiloliddinj avatar Dec 10 '24 12:12 hiloliddinj

My problem was also caused by polygon. I've wrapped the city with a polygon and that made the onTapListener not work only on android!

mahdidahouei avatar Dec 11 '24 05:12 mahdidahouei

Hi all, thank you for making this report, indeed tap gestures were consumed by annotation gesture recognition on Android, while on iOS annotation taps are also propagated to the map, I've aligned this behavior between the platforms here https://github.com/mapbox/mapbox-maps-flutter/pull/847

evil159 avatar Jan 27 '25 12:01 evil159