4

I have checked a lot of SO questions but none really answered it.

I am looking to add google map with animated markers. This means sprite display 3-4 frames while fixed at the location and while moving.

I thought about using AnimationDrawable but that didn't work. The other 2 solutions I have in mind are:

1-Use marker.setPosition and marker.setIcon in a "loopy handler". Inclined to use this but for some reason I feel it is an over kill especially that I may have 100 Markers

2-Add SurfaceView on the map and draw bitmaps using LocationToPixels functionality of the map. But that may be cumbersoms when gestures are moving.

Do you recommend any of the above or even a new solution? Please justify why so it is not an oppinionated answer.

Thank you

Snake
  • 14,228
  • 27
  • 117
  • 250
  • Have you checked thi http://stackoverflow.com/questions/14864664/animating-markers-on-google-maps-v2 and http://stackoverflow.com/questions/20581256/how-to-animate-google-map-v2-marker-on-the-polyline-path – surhidamatya Nov 20 '14 at 04:33
  • 1
    Yep and does not serve the need if you read my question in details – Snake Nov 20 '14 at 05:01
  • According to this answer, the google play services maps demo animated marker does it with a "loopy handler". However, they only do it for only one marker and every 16milliseconds. http://stackoverflow.com/questions/13728041/move-markers-in-google-map-v2-android is there any way you can estimate how many markers you will be displaying? Have you considered only animating only the ones located within the viewport of the map? – Robert Estivill Nov 25 '14 at 23:14
  • Here they talk about animating markers while moving them. I want to have a continuous animation while fixed(say sprite dancing). I expect around 50 markers – Snake Nov 27 '14 at 19:28

0 Answers0