Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to animate the position of a marker/cluster with Mapbox? #69

Open
zilions opened this issue Mar 19, 2019 · 2 comments
Open

How to animate the position of a marker/cluster with Mapbox? #69

zilions opened this issue Mar 19, 2019 · 2 comments

Comments

@zilions
Copy link

zilions commented Mar 19, 2019

Is it possible to animate the position of a marker/cluster that is created with ClusterKit when used with Mapbox?

Mapbox supports this with native markers, although the same code does not work when applied to ClusterKit. Here is a demo on how Mapbox do this on iOS - https://docs.mapbox.com/android/maps/examples/animate-marker-position/

At the moment, we are having to destroy the cluster and rebuild it at the new coordinates, which is not a very nice user experience since it looks like the cluster is disappearing from one location and appearing at another - almost like it is jumping coordinates very quickly. We would like to animate the position of the cluster so that it appears like it is smoothly transitioning from one location to another.

We're also tried a few suggestions from this thread, although none seemed to work - mapbox/mapbox-gl-native#8378 (comment)

When attempting to apply any of the above solutions, the cluster/marker refuses to move position, and instead, it just stays at its original coordinates.

Is animating the position of a marker/cluster currently possible with ClusterKit?

@prgorasiya
Copy link

Any update on this? I am trying to achieve the same thing on my iOS project but no luck so far.
I want to move marker from point A to point B with animation.

@aramsargsyan
Copy link

@zilions @prgorasiya check out my PR #80 regarding animations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants