- Timestamp:
- 2014-12-30T11:03:41+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r7886 r7911 112 112 public static final StringProperty PROP_TILECACHE_DIR; 113 113 114 private static final boolean newcache = Main.pref.getBoolean("tms.newcache");115 116 114 static { 117 115 String defPath = null; 118 116 try { 119 if (newcache) { 120 defPath = new File(Main.pref.getCacheDirectory(), "tms").getAbsolutePath(); 121 } else { 122 defPath = OsmFileCacheTileLoader.getDefaultCacheDir().getAbsolutePath(); 123 } 117 defPath = new File(Main.pref.getCacheDirectory(), "tms").getAbsolutePath(); 124 118 } catch (SecurityException e) { 125 119 Main.warn(e); 126 120 } 127 PROP_TILECACHE_DIR = new StringProperty(PREFERENCE_PREFIX + (newcache ? ".tilecache" : ".tilecache_path"), defPath);121 PROP_TILECACHE_DIR = new StringProperty(PREFERENCE_PREFIX + ".tilecache", defPath); 128 122 } 129 123 … … 143 137 try { 144 138 OsmFileCacheTileLoader loader; 145 if (newcache) { 146 loader = new TMSFileCacheTileLoader(listener, new File(cachePath)); 147 } else { 148 loader = new OsmFileCacheTileLoader(listener, new File(cachePath)); 149 } 139 loader = new TMSFileCacheTileLoader(listener, new File(cachePath)); 150 140 loader.headers.put("User-Agent", Version.getInstance().getFullAgentString()); 151 141 return loader;
Note:
See TracChangeset
for help on using the changeset viewer.