So LevelListDrawable
s are not an option, due to Gmap's use of BitmapDescriptorFactory
.
One solution I found was to draw a Marker
on top of the old one with the new color, then delete the old one from underneath.
There were two issues to that.
- One, google-maps-android-v2 doesn't support z-indexing for
Marker
s. - Two, if you have a lot of
Marker
s to change the color of, the performance of it causes artifacts.
Now, recently Google released an update that made Marker
s with a common Bitmap
a lot faster to draw, but you can always throw more Markers
at it and break it.
I also attempted to draw a Marker
on top, but with its visibility set to false
, and to then set it to true
when that location got "selected". This didn't seem too much faster although in fairness I did not benchmark it.
The conclusion: Don't change Bitmap
s on Marker
s. (For now)