Search code examples
mapboxmapbox-android

Annotation "blinks" when updated frequently


I receive a steam of GPS locations representing a vehicle, and I want to show it as an annotation on the map. Showing the annotation is fine.

Whenever I receive a new GPS location, I update the symbol with:

vehicleSymbol.setLatLng(newLatLng);
symbolManager.update(vehicleSymbol);

However, the symbol "blinks", apparently mostly when I zoom in. This can be seen on the following video: https://streamable.com/zqhxo

Am I doing something wrong? Is there a maximum rate at which I can update the symbol?


Solution

  • Setting setIconAllowOverlap to true did it:

    symbolManager.setIconAllowOverlap(true);