public static Drawable getCacheTypeMarker(final Resources res, final CacheType type) {
        final Geocache tempCache = new Geocache();
        tempCache.setType(type);
        // user-defined should always use the hexagonal icon
        tempCache.setGeocode(type == CacheType.USER_DEFINED ? "ZZ1" : "GC1");
        return getTypeMarker(res, tempCache, false, false, true);
    }
Create a cache from a cache type to select the proper background shape

@param res  Android Resources
@param type CacheType to get the icon for
@return Layered Drawable
main/src/main/java/cgeo/geocaching/utils/MapMarkerUtils.java