MarkerInfoWindow doesn't hold the clicked marker position after list refresh in Compose Map

27 views Asked by At

I am using com.google.maps.android:maps-compose:4.3.3 to show map with markers. There are not so much of them, so I don't use clustering. I have a mutableStateList of markers which fetches data visible in a current viewport from local Room database. I am using MarkerInfoWindow to show custom composable info window on marker click, also I don't use custom click listener, so it switches to default info window logic.

The problem is: I click on a marker, info window is shown, marker is centered, all good, but after marker list refreshes, the info window (very often) jumps to a random marker on a screen however my initially selected marker is still in a list.

I tried setting tag and snippet for MarkerInfoWindow assuming it will help with uniquely identifying the marker in a list, but it didn't help. Expected result: once info window is shown, even if the marker list refreshes and the selected marker is still in a list, info window stays where it was initially shown.

0

There are 0 answers