开发者

How to use bitmap from url as icon for ItemizedOverlay - WITH CACHE?

开发者 https://www.devze.com 2023-04-05 05:10 出处:网络
I\'ve seen plenty of examples of how to create an ItemizedOverlay on MapView with an image from the bundle.I\'ve seen plenty of examples of how to get a Drawable from a URL.I\'ve even managed to 开发者

I've seen plenty of examples of how to create an ItemizedOverlay on MapView with an image from the bundle. I've seen plenty of examples of how to get a Drawable from a URL. I've even managed to 开发者_JAVA百科cobble the two together to use a drawable made from a bitmap fetched remotely. Now the problem I'm running into is how can I make that Drawable cachable?


Don't cache drawables - this can lead to memory leak.

You should cache Bitmaps and create Drawables from then when needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号