I am displaying markers on a map. I am not sure how I can specify a different drawable resource for different markers?
I would like to show a green pin if locations distance < 50, etc. etc.
pin = getResources().getDrawable(R.drawable.pushpin);
itemizedOverlay = new MyItemizedOverlay(pin, mapView);
for (Record element : list) {
GeoPoint point;
OverlayItem overlayItem;
double lat = Double.parseDouble(element.getLatitude());
double lng = Double.parseDouble(element.getLongitude());
double locationDistance = Double.parseDouble(element.getLocationDist());
geoPoint.add(new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6)));
listOfOverlays = mapView.getOverlays();
point = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6));
Log.i("deep", "deep " + point);
overlayItem = new OverlayItem(point, "", element.getTitle());
if(locationDistance < 50){
//green
}
else if(locationDistance > 50 && locationDistance < 100){
//yellow
}
else if(locationDistance > 100 && locationDistance < 150){
//blue
}