Changeset 18186 in josm


Ignore:
Timestamp:
2021-08-31T18:21:51+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21271 - Add MVT tile cache to imagery cache settings (patch by taylor.smock)

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/MVTLayer.java

    r17867 r18186  
    2424import javax.swing.JMenuItem;
    2525
     26import org.apache.commons.jcs3.access.CacheAccess;
    2627import org.openstreetmap.gui.jmapviewer.Tile;
    2728import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
    2829import org.openstreetmap.josm.actions.ExpertToggleAction;
    2930import org.openstreetmap.josm.data.Bounds;
     31import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
    3032import org.openstreetmap.josm.data.imagery.ImageryInfo;
    3133import org.openstreetmap.josm.data.imagery.vectortile.mapbox.Layer;
     
    8890    }
    8991
     92    /**
     93     * Returns cache region for MVT layer.
     94     * @return cache region for MVT layer
     95     * @since 18186
     96     */
     97    public static CacheAccess<String, BufferedImageCacheEntry> getCache() {
     98        return AbstractCachedTileSourceLayer.getCache(CACHE_REGION_NAME);
     99    }
     100
    90101    @Override
    91102    public Collection<String> getNativeProjections() {
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheSettingsPanel.java

    r17830 r18186  
    4040import org.openstreetmap.josm.gui.layer.WMSLayer;
    4141import org.openstreetmap.josm.gui.layer.WMTSLayer;
     42import org.openstreetmap.josm.gui.layer.imagery.MVTLayer;
    4243import org.openstreetmap.josm.gui.util.GuiHelper;
    4344import org.openstreetmap.josm.gui.util.TableHelper;
     
    7980            addToPanel(WMSLayer.getCache(), "WMS");
    8081            addToPanel(WMTSLayer.getCache(), "WMTS");
     82            addToPanel(MVTLayer.getCache(), "MVT");
    8183        });
    8284    }
Note: See TracChangeset for help on using the changeset viewer.