public static Drawable getTypeMarker(final Resources res, @NonNull final Geocache cache, final boolean withBorder, final boolean applyScaling, final boolean forCache) {
        final int hashcode = new HashCodeBuilder()
                .append("typeMarker")
                .append(cache.getType().id)
                .append(cache.isDisabled())
                .append(cache.isArchived())
                .append(withBorder)
                .append(forCache)
                .append(applyScaling)
                .toHashCode();

        synchronized (overlaysCache) {
            CacheMarker marker = overlaysCache.get(hashcode);
            if (marker == null) {
                marker = new CacheMarker(hashcode, createTypeMarker(res, cache, withBorder, applyScaling, forCache));
                overlaysCache.put(hashcode, marker);
            }
            return marker.getDrawable();
        }
    }
Provide the LayerDrawable representing the cache type icon

@param res   Android Resources
@param cache Geocache to get the icon for
@param withBorder    Draw a round border around the icon (for waypoint markers)
@param applyScaling  S
@return Layered Drawable
main/src/main/java/cgeo/geocaching/utils/MapMarkerUtils.java