- Timestamp:
- 2011-10-20T01:47:10+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r4506 r4529 15 15 import java.awt.event.MouseAdapter; 16 16 import java.awt.event.MouseEvent; 17 import java.awt.font.TextAttribute;18 import java.awt.geom.Rectangle2D;19 17 import java.awt.image.ImageObserver; 20 18 import java.io.File; … … 22 20 import java.util.ArrayList; 23 21 import java.util.Collections; 24 import java.util.HashMap;25 22 import java.util.HashSet; 26 23 import java.util.LinkedList; … … 69 66 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 70 67 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 71 import org.openstreetmap.josm.tools.OpenBrowser;72 68 73 69 /** … … 132 128 }*/ 133 129 } 130 134 131 @Override 135 132 public TileCache getTileCache() … … 137 134 return tileCache; 138 135 } 136 139 137 void clearTileCache() 140 138 { 141 /*if (debug) { 142 Main.debug("clearing tile storage"); 143 }*/ 144 tileCache = new MemoryTileCache(); 145 tileCache.setCacheSize(200); 139 tileCache.clear(); 140 if (tileLoader instanceof OsmFileCacheTileLoader) { 141 ((OsmFileCacheTileLoader)tileLoader).clearCache(tileSource); 142 } 146 143 } 147 144 … … 244 241 currentZoomLevel = getBestZoom(); 245 242 246 clearTileCache(); 243 tileCache = new MemoryTileCache(); 244 247 245 String cachePath = TMSLayer.PROP_TILECACHE_DIR.get(); 248 246 tileLoader = null; … … 441 439 @Override 442 440 public void actionPerformed(ActionEvent ae) { 443 //Main.debug("flushing all tiles...");444 441 clearTileCache(); 445 //Main.debug("done");446 442 } 447 443 })); … … 560 556 } 561 557 public boolean decreaseZoomLevel() { 562 int minZoom = this.getMinZoomLvl();558 //int minZoom = this.getMinZoomLvl(); 563 559 if (zoomDecreaseAllowed()) { 564 560 /*if (debug) { … … 784 780 // need to return *all* tiles to the callers, so force creation 785 781 // here. 786 boolean forceTileCreation = true;782 //boolean forceTileCreation = true; 787 783 for (Tile tile : ts.allTilesCreate()) { 788 784 Image img = getLoadedTileImage(tile); … … 842 838 } 843 839 844 String tileStatus = tile.getStatus();845 /*if (!tile.isLoaded() && PROP_DRAW_DEBUG.get()) {840 /*String tileStatus = tile.getStatus(); 841 if (!tile.isLoaded() && PROP_DRAW_DEBUG.get()) { 846 842 myDrawString(g, tr("image " + tileStatus), p.x + 2, texty); 847 843 texty += 1 + fontHeight;
Note:
See TracChangeset
for help on using the changeset viewer.