views:

69

answers:

1

Hi,

I have a map that dispays markers. If the user clicks on a marker a popup shows up. A method calculates wheather there is a marker at the clicked position.

My Problem is that I have a lot of different markers, but in this method I can handle only one specific marker.

I need something like a general bitmap, that holds all marker resources. E.g. I do not wand to handle 100 markers manually, because all are a Bitmap so I need just to handle one general bitmap.

any ideas?

A: 

I have solved my problem. I define a MarkerManager class that holds static fields that contain intergers.

public class MarkerManager{
    private static final int ME = 1;

public static int getResource(int id){
    int marker = 0;
    switch(id){
    case id:
        marker = R.drawable.me;
    break;

    }
    return marker;
}

}

ArtWorkAD