GIF type animation for marker in google map api ANDROID

你说的曾经没有我的故事 提交于 2019-11-29 03:59:42

Please help me what I am doing wrong

You are modifying an object that is no longer being used. Once addMarker() is called, the MarkerOptions object has no further meaning, yet this is what you are modifying via your postDelayed() logic.

(BTW, you don't need a Handler, as postDelayed() is available on any View)

addMarker() returns a Marker. You will need to work with that Marker to affect your changes, via setIcon().

Also, since your bitmaps are not changing, I suggest caching your two BitmapDescriptor objects, rather than re-creating them on every pass.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!