vlio20
vlio20

Reputation: 9295

Google maps bounce-in animation for markers on show, on Android?

Is there any way to animate the markers showing on the map? My markers are being shown as I scroll the through the map (asynchronously). For now, they appear static on the map. I would like to make them fall in from above while fading in. Is there any way to add this option to MarkerOptions? something like this:

static final LatLng MELBOURNE = new LatLng(-37.813, 144.962);
Marker melbourne = mMap.addMarker(new MarkerOptions()
                          .position(MELBOURNE)
                          .alpha(0.7f))
                          .animateShow(MarkerOptions.BOUNCE_IN); //this is what I wish for

THANKS!

Upvotes: 2

Views: 4272

Answers (1)

Omar HossamEldin
Omar HossamEldin

Reputation: 3111

Here is a simple answer by getting the location x , y coordinates on the mapView and starting animation fro y = 0 till the location coordinates

https://stackoverflow.com/a/16607055/2294985

Upvotes: 1

Related Questions