mapbox / mapbox-plugins-android

Mapbox Android Plugins are a collection of libraries that extend our other SDKs, helping you design powerful mapping features while the plugins handle most of the heavy lifting.
https://www.mapbox.com/android-docs/plugins/overview/
BSD 2-Clause "Simplified" License
241 stars 119 forks source link

Annotation blinking issue with Mapbox version >8.6.3 #1130

Closed AndrKzntsv closed 4 years ago

AndrKzntsv commented 4 years ago

We've encountered an issue with symbols blinking when changing positions frequently. The setup is exactly like one described in #1043.

SymbolManager instance is configured with iconAllowOverlap set to true:

private val symbolManager =
    SymbolManager(mapboxView, mapboxMap, mapboxStyle).apply {
        iconAllowOverlap = true
    }

The symbol is updated like this:

roverSymbol.latLng = position
symbolManager.update(roverSymbol)

Everything worked fine with the Mapbox version 8.6.3. We check all newer versions – the symbol blinks.

Blinking symbol

langsmith commented 4 years ago

Thanks for the ticket @AndrKzntsv . This flickering is likely the same as discussed at:

The fix has already landed in the Maps SDK for Android and will be delivered in the next stable release of the Maps SDK for Android.

AndrKzntsv commented 4 years ago

Thank you for the quick reply! Will be waiting for the update.

langsmith commented 4 years ago

Great, thanks for your patience.

langsmith commented 4 years ago

By the way, @AndrKzntsv , along with iconAllowOverlap(), iconIgnorePlacement() is another often-used PropertyFactory method used to control the visual collision of symbols.

See https://docs.mapbox.com/android/maps/examples/symbol-collision-detection and https://docs.mapbox.com/android/maps/examples/marker-symbol-layer

AndrKzntsv commented 4 years ago

Thanks for the advice. Somehow, I've never experimented with this option.

mrfaa commented 4 years ago

hi @langsmith is there already a release date for next stable release of the Maps SDK for Android? :)

mrfaa commented 4 years ago

Hi @langsmith i updated the Android SDK (9.3.0) but unfortunately i'm experiencing the same issue like described in #16473 and obove.

Any thoughts about this behavior?

tobrun commented 4 years ago

Validated with v9.4.0 that this is not an issue anymore:

ezgif com-video-to-gif (18)

For this I updated Change Symbol example to not update the icon image here. Note that it uses the aforementioned APIs as

          symbolManager.setIconAllowOverlap(true);
          symbolManager.setTextAllowOverlap(true);

Configured here.