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

Animate cluster when visible #1

Closed
webserveis opened this issue Dec 12, 2017 · 4 comments
Closed

Animate cluster when visible #1

webserveis opened this issue Dec 12, 2017 · 4 comments

Comments

@webserveis
Copy link

Great library, right now I was looking for a solution whith clustering...

I see in the demo/gir that the cluster is hidden and shown only when necessary

Is posible add animate fade-in when cluster is needed draw in viewport?
Similar objects in google maps, labels, icons...

Or other feature, posible set factor viewport "visible"
increase the viewport as if it were 1.2f, so the clusters are pre-loaded before being visualized

@makovkastar
Copy link
Member

  1. You are right, only the markers, that are inside a visible camera rect are rendered. Regarding the marker appear animation: I think it's a good idea, but the Marker class doesn't expose any methods to change its transparency. If you find the way to animate the appearance of a marker - let me know.
  2. I wanted the library to be as fast as possible, so I decided to minimize the amount of rendered markers.

@webserveis
Copy link
Author

Look https://developers.google.com/android/reference/com/google/android/gms/maps/model/Marker

Alpha
Sets the opacity of the marker. Defaults to 1.0.

I found this for animate fadeIn
https://stackoverflow.com/questions/19753765/maps-v2-marker-animation-fade-in-and-out

ObjectAnimator.ofFloat(marker, "alpha", 0f, 1f).setDuration(500).start();

@makovkastar
Copy link
Member

Oh, I see, thanks. I somehow overlooked the method. I could try adding the appearing animation and see how it will look.

@makovkastar
Copy link
Member

I have implemented the appearance animation. Check this commit: c5652fd. I will release a new version soon.

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

No branches or pull requests

2 participants