- Timestamp:
- 2016-09-07T00:10:08+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r10969 r10971 1680 1680 ts = dts.getTileSet(displayZoomLevel); 1681 1681 if (!dts.getTileSetInfo(displayZoomLevel).hasAllLoadedTiles && displayZoomLevel < zoom) { 1682 /* 1683 * if we are showing tiles from lower zoom level, ensure that all tiles are loaded 1684 * as they are few, and should not trash the tile cache 1685 * This is especially needed when dts.getTileSet(zoom).tooLarge() is true and we are 1686 * not loading tiles 1687 */ 1682 // if we are showing tiles from lower zoom level, ensure that all tiles are loaded as they are few, 1683 // and should not trash the tile cache 1684 // This is especially needed when dts.getTileSet(zoom).tooLarge() is true and we are not loading tiles 1688 1685 ts.loadAllTiles(false); 1689 1686 } … … 1713 1710 } 1714 1711 Tile t2 = tempCornerTile(missed); 1715 TileSet ts2 = getTileSet( 1716 getShiftedLatLon(tileSource.tileXYToLatLon(missed)), 1717 getShiftedLatLon(tileSource.tileXYToLatLon(t2)), 1718 newzoom); 1719 // Instantiating large TileSets is expensive. If there 1720 // are no loaded tiles, don't bother even trying. 1712 TileSet ts2 = getTileSet(getShiftedLatLon(tileSource.tileXYToLatLon(missed)), 1713 getShiftedLatLon(tileSource.tileXYToLatLon(t2)), 1714 newzoom); 1715 // Instantiating large TileSets is expensive. If there are no loaded tiles, don't bother even trying. 1721 1716 if (ts2.allLoadedTiles().isEmpty()) { 1722 1717 newlyMissedTiles.add(missed); … … 1746 1741 displayZoomLevel, this); 1747 1742 1748 //g.drawString("currentZoomLevel=" + currentZoomLevel, 120, 120);1749 1743 g.setColor(Color.lightGray); 1750 1744 … … 1756 1750 myDrawString(g, tr("increase tiles zoom level (change resolution) to see more detail"), 120, 120); 1757 1751 } 1758 1759 1752 if (noTilesAtZoom) { 1760 1753 myDrawString(g, tr("No tiles at this zoom level"), 120, 120); … … 1767 1760 myDrawString(g, tr("Estimated cache size: {0}", estimateTileCacheSize()), 50, 200); 1768 1761 if (tileLoader instanceof TMSCachedTileLoader) { 1769 TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader) tileLoader;1770 1762 int offset = 200; 1771 for (String part: cachedTileLoader.getStats().split("\n")) {1763 for (String part: ((TMSCachedTileLoader) tileLoader).getStats().split("\n")) { 1772 1764 offset += 15; 1773 1765 myDrawString(g, tr("Cache stats: {0}", part), 50, offset);
Note:
See TracChangeset
for help on using the changeset viewer.