3

i am developing an android application which is based on mapview. (a live real time bus timing application).

im using the "overlay" class for this purpose (inserting the icons etc'). i am recieving an array of GeoPoints, and i need to create an animation in which a certain icon is moving through the GeoPoints index route. (in short - an icon that represents a bus which is moving on a certain road / route)

how can this animation be achieved?

2 Answers2

0

You need first remove previous overlay item then add new overlay item with new Lat-Long points when it received....that's why you need to use broad cast receiver to get new updated location & code executes.,..

-1

Its not possible to animate an Overlay, you have to show all the route geopoint one by one on a single overlay. I would suggest to create an TimerTask to iterate on placing Overlay with your points.( Only one point is visible at the same time. Change the timerTask speed to change the animation speed.(i think 100ms is good animation time)

Anis BEN NSIR
  • 2,555
  • 20
  • 29