mapbox-plugins-android icon indicating copy to clipboard operation
mapbox-plugins-android copied to clipboard

Android: SymbolManager.OnSymbolClickListener Not Called

Open otmanskim opened this issue 6 years ago • 4 comments

Description

I have a mapView contained in a fragment, and am adding Symbols to the map and observing clicks on them. However after backgrounding/foregrounding the app, or navigating to another activity and back to the one containing the map, the OnSymbolClickListener is no longer receiving symbol click events.

Steps to reproduce

  1. Add Symbols to a map using the symbolManager.update(Symbol symbol) function, and observing clicks on these symbols via symbolManager.addClickListener().
  2. Verify taps on the Symbols trigger the clickListener
  3. Background/Foreground the app

Expected behavior

The click listener should still fire when symbols are tapped

Actual behavior

The click listener is no longer fired when symbols are tapped

While debugging, I was able to verify that the map's SymbolManager still had a registered onClickListener after foregrounding the app, and that the Symbols themselves were still present.

Configuration

Android versions: Android 8 Device models: Samsung Galaxy S8 Mapbox SDK versions: mapbox-android-sdk:7.3.1 mapbox-android-plugin-annotation-v7:0.5.0

otmanskim avatar Sep 10 '19 15:09 otmanskim

@otmanskim thank you for the report, I transferred this issue to mapbox-plugins-android as this issue is specific to the annotations plugin hosted in this repository. Thank you for using our products and providing feedback!

tobrun avatar Sep 10 '19 18:09 tobrun

What is the situation of this issue and is there common roundabout that can be used?

SDeveloper30 avatar Feb 26 '20 14:02 SDeveloper30

Any update? IMO clicking on some more specified layer should have a priority over a whole map... z-indices or something?

Azbesciak avatar Oct 20 '20 06:10 Azbesciak

I found solution for linked issue. https://github.com/mapbox/mapbox-gl-native/issues/15718#issuecomment-983202888

I hope it helps.

t-hara avatar Dec 01 '21 01:12 t-hara