[mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Goncalo Oliveira
Hi, I'm facing an issue with Google maps and custom bitmaps as marker icons and I'm a little confused if I'm doing the thing the wrong way or there's something wrong happening either with Google maps component or with the Xamarin - JVM bridge. 1. I'm placing a huge quantity of markers on the map.

Re: [mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Agustín Giménez
Hi. I may be wrong, but I velibe its normal. When you are giving a resource as bitmap, i think it will reuse the same bitmap all the time, so you have 900 markers, but only a bitmap. But with your function you are creating 900 bitmaps, so you are eating a lot of memory. Also you arent disposin

Re: [mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Goncalo Oliveira
Augustin, Thanks for replying. I actually did try to call Recycle and Dispose on the bitmaps, also nulling instances and GC.Collect a bit. None of those worked. And adding to the fact that it didn't work, it also slowed things a lot (kind of expected). However, I did went to the trouble of making

Re: [mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Agustín Giménez
Well, md will eat some resources, so it may be a combination of too many bitmaps plus the md overhead... A way to avoid this, is using custom overlays and draw it by yourself, load the initial bitmap in memory and on the draw of the overlay draw the image and the text, in this way you will not

Re: [mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Goncalo Oliveira
API v1 had a way of doing this, there was an onDraw overridable for the marker. I don't know how to do that in the current maps API version or if it's even possible. On 4 July 2013 18:50, Agustín Giménez wrote: > Well, md will eat some resources, so it may be a combination of too many > bitmaps

Re: [mono-android] Fwd: Android Google maps and Bitmap marker icon issue

2013-07-04 Thread Agustín Giménez
Wow, you are right, the new api gives no facility to do this... Its been a lot since i used google maps... Well, only thing i can think now is to use two markers, one with the marker itself, using the image from a resource, and another one with the text, in this way you can measure the size of