If you're developing an application that uses Google's Map API for Android and you need to add/remove items from the map while displaying the map, you have a few options:
1) "Allocate" all your objects in advance and disable items that should not be shown. This means you will not add/remove items to the ItemizedOverlay backing collection, but instead manage which ones are drawn in the draw() method. This may work well for many, but did not work for my scenario.
2) Create your own implementation of Overlay that handles concurrent modifications to its data structure. I chose this option, in particular because I didn't need all the capability that ItemizedOverlay offers.
3) Something else?
SolaveiThanx for it!!!!
ReplyDelete