Changeset 10545 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2016-07-17T12:40:18+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r10534 r10545 703 703 int ret = (int) Math.ceil( 704 704 Math.pow(2d, ZOOM_OFFSET.get()) * visibileTiles // use offset to decide, how many tiles are visible 705 * 2);705 * 4); 706 706 Main.info("AbstractTileSourceLayer: estimated visible tiles: {0}, estimated cache size: {1}", visibileTiles, ret); 707 707 return ret; … … 1205 1205 1206 1206 1207 private final TileSet nullTileSet = new TileSet( (LatLon) null, (LatLon) null, 0);1207 private final TileSet nullTileSet = new TileSet(); 1208 1208 1209 1209 private final class MapWrappingTileSet extends TileSet { … … 1254 1254 TileXY t2 = tileSource.latLonToTileXY(botRight.toCoordinate(), zoom); 1255 1255 1256 x0 = t1.getXIndex();1257 y0 = t1.getYIndex();1258 x1 = t2.getXIndex();1259 y1 = t2.getYIndex();1256 x0 = (int) Math.floor(t1.getX()); 1257 y0 = (int) Math.floor(t1.getY()); 1258 x1 = (int) Math.ceil(t2.getX()); 1259 y1 = (int) Math.ceil(t2.getY()); 1260 1260 sanitize(); 1261 1262 } 1263 1264 private TileSet(Tile topLeft, Tile botRight, int zoom) { 1265 } 1266 1267 /** 1268 * null tile set 1269 */ 1270 private TileSet() { 1271 return; 1261 1272 } 1262 1273 … … 1390 1401 } 1391 1402 } 1403 1404 @Override 1405 public String toString() { 1406 return getClass().getName() + ": zoom: " + zoom + " X(" + x0 + ", " + x1 + ") Y(" + y0 + ", " + y1 + ") size: " + size(); 1407 } 1392 1408 } 1393 1409 … … 1558 1574 } 1559 1575 Tile t2 = tempCornerTile(missed); 1560 LatLon topLeft2 = getShiftedLatLon(tileSource.tileXYToLatLon(missed)); 1561 LatLon botRight2 = getShiftedLatLon(tileSource.tileXYToLatLon(t2)); 1562 TileSet ts2 = new TileSet(topLeft2, botRight2, newzoom); 1576 TileSet ts2 = new TileSet( 1577 getShiftedLatLon(tileSource.tileXYToLatLon(missed)), 1578 getShiftedLatLon(tileSource.tileXYToLatLon(t2)), 1579 newzoom); 1563 1580 // Instantiating large TileSets is expensive. If there 1564 1581 // are no loaded tiles, don't bother even trying.
Note:
See TracChangeset
for help on using the changeset viewer.