Set up the answer here: https://groups.google.com/forum/#!topic/android-developers/KLaDMMxSkLs . The ColorFilter that you apply to the Drawable does not apply directly to the bitmap, it applies to the Paint used to render the Bitmap. Therefore, the modified working code will look like this:
String color = db.getCategoryColor(e.getCategoryId()); Bitmap ob = BitmapFactory.decodeResource(this.getResources(),R.drawable.event_location); Bitmap obm = Bitmap.createBitmap(ob.getWidth(), ob.getHeight(), ob.getConfig()); Canvas canvas = new Canvas(obm); Paint paint = new Paint(); paint.setColorFilter(new PorterDuffColorFilter(Color.parseColor(Model.parseColor(color)),PorterDuff.Mode.SRC_ATOP)); canvas.drawBitmap(ob, 0f, 0f, paint);
... and now we can add obm as a color map marker:
map.addMarker(new MarkerOptions().position(eventLocation) .title(e.getName()).snippet(e.getLocation()) .icon(BitmapDescriptorFactory.fromBitmap(obm)));
source share