Open
Description
Environment
- Android OS version: At least 13-15, probably any version
- Devices affected: /
- Maps SDK Version: 11.7.0 - latest(11.11.0), also affects v11.12.0-beta.1
Observed behavior and steps to reproduce
I have a map in compose on which several elements are shown or offset depending on the zoom level. Since version 11.7.0 the elements seem to flicker while zooming. It seems as if the offset is recalculated and the element is shown at the original position.
Expected behavior
My expectation would be that the elements would not flicker at all and behave comparable to the previous versions.
Notes / preliminary analysis
I have tested this in a sample project and could not reproduce it in versions <11.7.0. Nevertheless, the error is contained in all versions up to today (11.11.0).
Additional links and references
record_mapbox_flickering.mp4
Here is the code that i used for the example project in the video:
style.addImage(
imageId = "image",
image = bitmap
)
style.addImage(
imageId = "image2",
image = bitmap2
)
val source = geoJsonSource("pointSource").feature(featurePoint)
style.addSource(source)
style.addLayer(
symbolLayer("layer-test-symbol1", source.sourceId) {
minZoom(14.0)
iconImage("image")
iconAllowOverlap(true)
iconIgnorePlacement(true)
}
)
style.addLayer(
symbolLayer("layer-test-symbol2", source.sourceId) {
iconImage("image2")
iconAllowOverlap(true)
iconIgnorePlacement(true)
iconOffset(
step {
zoom()
literal(listOf(0.0, 0.0))
literal(14)
literal(listOf(0.0, -20.0))
},
)
}
)