Changeset 31468 in osm for applications/editors


Ignore:
Timestamp:
2015-08-08T13:39:33+02:00 (9 years ago)
Author:
wiktorn
Message:

Pass custom headers to OsmTileLoader

Location:
applications/editors/josm/plugins/imagerycache
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagerycache/build.xml

    r31304 r31468  
    55    <property name="commit.message" value="[JOSM_ImageryCache]: correct database cleaning, at last"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="8526"/>
     7    <property name="plugin.main.version" value="8648"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/ImageryCachePlugin.java

    r31304 r31468  
    2020    TileLoaderFactory factory = new TileLoaderFactory() {
    2121        @Override
    22         public OsmTileLoader makeTileLoader(TileLoaderListener listener) {
     22        public OsmTileLoader makeTileLoader(TileLoaderListener listener, Map<String, String> headers) {
    2323            String cachePath = CachedTileLoaderFactory.PROP_TILECACHE_DIR.get();
    2424            try {
     
    2929           
    3030            if (cachePath != null && !cachePath.isEmpty()) {
    31                 return new OsmDBTilesLoader(listener, new File(cachePath));
     31                return new OsmDBTilesLoader(listener, new File(cachePath), headers);
    3232            }
    3333            return null;
     
    3535
    3636        @Override
    37         public TileLoader makeTileLoader(TileLoaderListener listener,
    38                 Map<String, String> headers) {
    39             return makeTileLoader(listener);
     37        public TileLoader makeTileLoader(TileLoaderListener listener) {
     38            return makeTileLoader(listener, null);
    4039        }
    4140    };
  • applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/OsmDBTilesLoader.java

    r31146 r31468  
    4040    protected long recheckAfter = FILE_AGE_ONE_DAY;
    4141
    42     public OsmDBTilesLoader(TileLoaderListener smap, File cacheFolder) {
    43         super(smap);
     42    public OsmDBTilesLoader(TileLoaderListener smap, File cacheFolder, Map<String, String> headers) {
     43        super(smap, headers);
    4444        dao = TileDAOMapDB.getInstance();
    4545        dao.setCacheFolder(cacheFolder);
Note: See TracChangeset for help on using the changeset viewer.