Changeset 16669 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-06-17T14:04:20+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r16643 r16669 1159 1159 1160 1160 /*if (PROP_DRAW_DEBUG.get()) { 1161 myDrawString(g, "x=" + t .getXtile() + " y=" + t.getYtile() + " z=" + zoom + "", p.x + 2, texty);1161 myDrawString(g, "x=" + tile.getXtile() + " y=" + tile.getYtile() + " z=" + tile.getZoom() + "", x + 2, texty); 1162 1162 texty += 1 + fontHeight; 1163 if ((t .getXtile() % 32 == 0) && (t.getYtile() % 32 == 0)) {1164 myDrawString(g, "x=" + t .getXtile() / 32 + " y=" + t.getYtile() / 32 + " z=7", p.x + 2, texty);1163 if ((tile.getXtile() % 32 == 0) && (tile.getYtile() % 32 == 0)) { 1164 myDrawString(g, "x=" + tile.getXtile() / 32 + " y=" + tile.getYtile() / 32 + " z=7", x + 2, texty); 1165 1165 texty += 1 + fontHeight; 1166 1166 } … … 1169 1169 String tileStatus = tile.getStatus(); 1170 1170 if (!tile.isLoaded() && PROP_DRAW_DEBUG.get()) { 1171 myDrawString(g, tr("image " + tileStatus), p.x + 2, texty);1171 myDrawString(g, tr("image " + tileStatus), x, texty); 1172 1172 texty += 1 + fontHeight; 1173 1173 }*/ … … 1296 1296 for (Tile t : allTiles) { 1297 1297 loadTile(t, force); 1298 } 1299 } 1300 1301 /** 1302 * Extend tile loading corridor, so that no flickering happens whan panning 1303 */ 1304 private void overloadTiles() { 1305 int overload = 1; 1306 int minXo = Utils.clamp(minX-overload, tileSource.getTileXMin(zoom), tileSource.getTileXMax(zoom)); 1307 int maxXo = Utils.clamp(maxX+overload, tileSource.getTileXMin(zoom), tileSource.getTileXMax(zoom)); 1308 int minYo = Utils.clamp(minY-overload, tileSource.getTileYMin(zoom), tileSource.getTileYMax(zoom)); 1309 int maxYo = Utils.clamp(maxY+overload, tileSource.getTileYMin(zoom), tileSource.getTileYMax(zoom)); 1310 for (int x = minXo; x < maxXo; ++x) { 1311 for (int y = minYo; y < maxYo; ++y) { 1312 loadTile(getOrCreateTile(x, y, zoom), false); 1313 } 1298 1314 } 1299 1315 } … … 1553 1569 1554 1570 List<Tile> missedTiles = this.paintTileImages(g, ts); 1571 if (getDisplaySettings().isAutoLoad()) { 1572 ts.overloadTiles(); 1573 } 1555 1574 int[] otherZooms = {1, 2, -1, -2, -3, -4, -5}; 1556 1575 for (int zoomOffset : otherZooms) {
Note:
See TracChangeset
for help on using the changeset viewer.