googlemaps / googlemaps/android-maps-compose

Maps: Markers moving into clusters

Open
#311 4 comments 21 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
Kotlin
Stars
1.3k
Forks
181
Avg merge
2d 23h
Merged PRs (30d)
18

Description

#### Environment details

maps-compose: 2.11.4

#### Steps to reproduce

I added a simple project to [this repo](https://github.com/joaocaseiro/MapClustersIssue) where the issue can be seen.

In this sample project I am creating a list of pins and storing it in a state, along with the info of a selected pin. The selected pins show an image different than normal pins. When the user clicks a pin the state updates and it will be selected, and the camera will move to it. Clicking another pin will deselect it and select the new pin.

The issue seems to happen when a pin is too close to a cluster and is selected/deselected. The pin becomes selected or deselected and the image is changed, but when the map updates there is an animation of the old image from the point where it was displayed into the cluster, leaving the new image in the correct place. This doesn't seem to happen anymore if we zoom in and the pin is no longer very close to the cluster.

(here is a gif also shown on the readme that displays what happens)
![Example gif](https://media.giphy.com/media/VD9qZqrVLu4BMGQDd9/giphy.gif)

Please let me know if any more info is necessary about this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.