Question

I would like to add an AnimationDrawable as image to my Marker on Google Map v2, but it seems not to be really possible. Does anyone know how MyLocation blue blinking circle is implemented in Android Google Maps or how I could add an animated drawable as a marker?

Was it helpful?

Solution

As of Feb'13 release you cannot.

There are feature requests on gmaps-api-issues to add animations or possibility to change icon after creating marker.

A workaround is to create multiple markers with the same position and set visible on one of them at a time, but this won't work well if you use info window.

Edit:

You can now use Marker::setIcon, but it still has issues with info window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top