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

PointAnnotationManager.addOnPointAnnotationClickListener is shared between all PointAnnotationManagers

Open j-bbr opened this issue 1 year ago • 6 comments

When creating multiple PointAnnotationManager and adding OnPointAnnotationClickListener to them I found that only the last listener is called. This is especially counter intuitive since the listener is added to the individual AnnotationManager but click listeners are apparently shared at the map level.

j-bbr avatar Feb 10 '25 08:02 j-bbr

Hi @j-bbr, could you provide which MapboxMaps SDK version are you using? We have recently addressed an issue with annotation's click listener being registered without channel suffix here, this fix is released in our v2.4.1. If you are using an older version of our SDK, please update to use the latest one, if not, please let me know here and I will create a ticket and work on it asap

maios avatar Feb 13 '25 10:02 maios

Hi, @maios I am on version 2.5.0

j-bbr avatar Feb 17 '25 11:02 j-bbr

Seeing this same issue with 2.6.0 @maios. This is a blocking bug stopping us from releasing :(

brandon-watkins-avcrm avatar Mar 05 '25 22:03 brandon-watkins-avcrm

Any update on this one?

ahmadrana24 avatar Mar 10 '25 12:03 ahmadrana24

Ended up changing the implementation to not use the PointAnnotationManager at all and instead add points to the map using style layers and GeoJson

brandon-watkins-avcrm avatar Mar 11 '25 06:03 brandon-watkins-avcrm

@brandon-watkins-avcrm can you please provide the docs link for using styles and GeoJson or any example?

ahmadrana24 avatar Mar 21 '25 15:03 ahmadrana24