private static BitmapDrawable getScaledEmojiDrawable(final Resources res, final int emoji, final String wantedSize, final boolean applyScaling) {
        final EmojiUtils.EmojiPaint paint;
        if (emojiPaintMap.containsKey(wantedSize + applyScaling)) {
            paint = emojiPaintMap.get(wantedSize + applyScaling);
        } else {
            final float scalingFactor;
            final float size;
            switch (wantedSize) {
                case "listMarkerForCache":
                    scalingFactor = 1.2f * getCacheScalingFactor(applyScaling);
                    size = SIZE_LIST_MARKER_DP;
                    break;
                case "listMarkerForWaypoint":
                    scalingFactor = 1.2f * getWaypointScalingFactor(applyScaling);
                    size = SIZE_LIST_MARKER_DP;
                    break;
                case "iconMarkerForWaypoint":
                    scalingFactor = 0.6f * getWaypointScalingFactor(applyScaling);
                    size = SIZE_LIST_MARKER_DP;
                    break;
                case "iconMarkerForCache":
                    scalingFactor = 0.6f * getCacheScalingFactor(applyScaling);
                    size = SIZE_LIST_MARKER_DP;
                    break;
                case "mainIconForCache":
                    scalingFactor = (float) (Math.sqrt(0.5) * 1.15 * getCacheScalingFactor(applyScaling));
                    size = SIZE_CACHE_MARKER_DP;
                    break;
                case "mainIconForWaypoint":
                    scalingFactor = (float) (Math.sqrt(0.5) * 1.15 * getWaypointScalingFactor(applyScaling));
                    size = SIZE_CACHE_MARKER_DP;
                    break;
                default:
                    scalingFactor = 1.2f * getCacheScalingFactor(applyScaling);
                    size = SIZE_CACHE_MARKER_DP;
            }

            final int availableSize = DisplayUtils.getPxFromDp(res, size, scalingFactor);
            paint = new EmojiUtils.EmojiPaint(res, new Pair<>(availableSize, availableSize), availableSize, 0, DisplayUtils.calculateMaxFontsize(10, 1, 1000, availableSize));
            emojiPaintMap.put(wantedSize + applyScaling, paint);
        }
        return EmojiUtils.getEmojiDrawable(paint, emoji);
    }
Create a LayerDrawable showing the caches difficulty and terrain rating. If the connector doesn't support D/T show a "-" instead, if the info is missing (not loaded) a "?"
@param res           Resources bundle
@param difficulty    Difficulty rating
@param terrain       Terrain rating
@return              LayerDrawable composed of round background and foreground showing the ratings
main/src/main/java/cgeo/geocaching/utils/MapMarkerUtils.java