mapbox-maps-flutter
mapbox-maps-flutter copied to clipboard
`onPolygonAnnotationClick` is triggered 6 times on iOS
I have several polygons on my map with each polygon having its own click listener using my defined _AnnotationClickListener
import 'package:dartz/dartz.dart' show Function1;
final class _AnnotationClickListener extends OnPolygonAnnotationClickListener {
_AnnotationClickListener(
Function1<PolygonAnnotation, void> onAnnotationClick,
) : _onAnnotationClick = onAnnotationClick;
final Function1<PolygonAnnotation, void> _onAnnotationClick;
@override
void onPolygonAnnotationClick(PolygonAnnotation annotation) =>
_onAnnotationClick(
annotation,
);
}
However on iOS onPolygonAnnotationClick is triggered 6 times which in actuality I only clicked the Polygon once.
This problem does not happen on Android
Hi @Daeon97, can you provide which SDK version you are using? It looks like that in iOS if you have overlapping polygons, tapping the overlapping area will result in multiple triggers, can you also provide a sample code where you setup the polygon annotations?
Hi @Daeon97, do you have any other updates for this? If not, we will close this issue soon.