Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom camera animation on Google Maps Android

Is it possible to define custom camera animation on google maps in Android? This perhaps boils down to being able to create custom CameraUpdateFactory methods that interact with the animateCamera interpolator, etc. -- or just pass a custom animation.

The simplest thing I want to do is animate the camera at constant speed through multiple points. Say I have an array of LatLng, I want to accelerate once (perhaps zoom too), move at constant speed through all of the intermediate points, and decelerate at the last point (and perhaps reset zoom). Using map.animateCamera(CameraUpdateFactory.newCameraPosition(..)) has the unfortunate effect of zooming in/out and accelerate/decelerating at each point.

This seems too simple to not be supported out-of-the-box (both array or list of LatLng and being able to extend the camera animation functionality).

Thanks

like image 705
Ephraim Avatar asked Jan 25 '26 21:01

Ephraim


1 Answers

Unfortunatelly you can't have that functionality right now.

Chaining camera positions will look fine for some cases (see lines 80-100 here), but I guess not in your case.

One thing I can suggest is positng a feature request on gmaps-api-issues.

like image 155
MaciejGórski Avatar answered Jan 28 '26 11:01

MaciejGórski