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. SimpleCursorAdapter questions


Let me explain what I am trying to do before I explain my problem.
I'd like to have a dropdown menu (Spinner) that has a different "inner
value" than that which is displayed.  I am trying to load data stored
in an SQLite database.  Alright, enough of that.

So I figured that a SimpleCursorAdapter would be the way to do this,
but I can't for the life of me figure out where to go from there.
Here is a snippet of my current code:

String[] from = new String[] { Constants.NAME, Constants._ID };
// I know this is wrong, but this is what I am most confused about
int[] to = new int[] { R.id.search_location };
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.id.search_location, c, from, to  );

So anyway, do I need to make a custom layout just so that I can do
what I want, or is there an easier way to do this?  Any help at all
would be appreciated.



2. Android App Store

Was wondering if its possible to run the Android App Store application
on the emulator. I'd like to browse the store and see what apps are
available w/o having to buy the phone. I checked out the GIT
repository, but don't see the App store application in there. I'm
guessing Google is keeping that closed. :(
Would be nice if they at least provided us with the application in the

3. GridView Selector Padding

4. Problems with socket connection

5. PreferenceActivity Refresh Problem

6. process ids

7. How to export a "signed" apk package from Eclipse?