Overlay vs ItemizedOverlay, your thoughts?

by Mark Wyszomierski » Sun, 25 Oct 2009 01:42:44 GMT

Sponsored Links

I want to draw 20 pins on a MapActivity. Each pin has a small pin
image, but I have to dynamically overlay a small bit of text over each
pin at runtime. Looks like I have two options:

#1) Itemized Overlay
This is the suggested method. I put all my pins in one ItemizedOverlay
object, and that counts as a single Overlay object for my MapView.

#2) One Overlay per pin
Create a separate Overlay instance for each pin I need to render.

The problem I see with using method #1 is that you need to set a
drawable for the item. This would mean that I need to create 20+20
(one for focused/non-focused state each) bitmaps and keep them in
memory for the duration of my app. On the other hand, Overlay lets you
override the draw method so I can do the simple compositing at

The other issue with Itemized Overlay - although it handles focus for
you - does it move the focused item to the front of the z-order when



Overlay vs ItemizedOverlay, your thoughts?

by Loda » Wed, 11 Nov 2009 03:42:36 GMT


I'm newbie to android, but from the example
 http://developer.android.com/intl/es/guide/tutorials/views/hello-mapview.html ,
it seem to me that you do not need to create a drawable for each item.
it's more the opposite.

adn you can always overwrite the methode of OverlayItem...


Sponsored Links

Other Threads

1. How do you Debug a Live Wallpaper

I'm trying to write a Live Wallpaper, but have a problem.
The de{*filter*} won't.  Won't attach or debug when launching the wallpaper.
I can see from the logcat when I restart the Emulator that my wallpaper is
There is a msg showing it being installed, then uninstalling, then force
removing, then a WIN DEATH.
No Exception report.

Any ideas on how I can find out what is dieing?


2. webview show map problem?help me

I try webview show map,but is error.

  public void onCreate(Bundle savedInstanceState) {
        startButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Uri uri = Uri.parse("geo:38.899533,-77.036476");
                Intent it = new Intent(Intent.ACTION_VIEW, uri);



3. HttpPost responce is not showen properly in the Webkit!!

4. wanted to get more EIDs from Beacon frame into ScanResults

5. Problem with application launch on emulator

6. Finishing a GLSurface view activity takes too long..

7. Who is checking the state of Activity or Object(like buttons)