Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onPolygonAnnotationClick is triggered 6 times on iOS #646

Closed
Daeon97 opened this issue Aug 8, 2024 · 2 comments
Closed

onPolygonAnnotationClick is triggered 6 times on iOS #646

Daeon97 opened this issue Aug 8, 2024 · 2 comments

Comments

@Daeon97
Copy link

Daeon97 commented Aug 8, 2024

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

@Daeon97 Daeon97 changed the title PolygonAnnotationClickListener is triggered 6 times on iOS onPolygonAnnotationClick is triggered 6 times on iOS when Polygon is clicked only once Aug 8, 2024
@Daeon97 Daeon97 changed the title onPolygonAnnotationClick is triggered 6 times on iOS when Polygon is clicked only once onPolygonAnnotationClick is triggered 6 times on iOS Aug 8, 2024
@maios
Copy link
Contributor

maios commented Aug 8, 2024

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?

@maios
Copy link
Contributor

maios commented Aug 21, 2024

Hi @Daeon97, do you have any other updates for this? If not, we will close this issue soon.

@maios maios closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants