Changeset 11829 in josm
- Timestamp:
- 2017-04-03T13:59:39+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r11785 r11829 42 42 import java.util.function.Function; 43 43 import java.util.stream.Collectors; 44 import java.util.stream.IntStream; 44 45 import java.util.stream.Stream; 45 46 … … 61 62 import org.openstreetmap.gui.jmapviewer.OsmTileLoader; 62 63 import org.openstreetmap.gui.jmapviewer.Tile; 64 import org.openstreetmap.gui.jmapviewer.TileRange; 63 65 import org.openstreetmap.gui.jmapviewer.TileXY; 64 66 import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader; … … 93 95 import org.openstreetmap.josm.gui.layer.imagery.TileCoordinateConverter; 94 96 import org.openstreetmap.josm.gui.layer.imagery.TilePosition; 95 import org.openstreetmap.josm.gui.layer.imagery.TileRange;96 97 import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings; 97 98 import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings.DisplaySettingsChangeEvent; … … 1320 1321 } 1321 1322 1322 @Override 1323 /** 1324 * Gets a stream of all tile positions in this set 1325 * @return A stream of all positions 1326 */ 1323 1327 public Stream<TilePosition> tilePositions() { 1324 if ( this.insane()) {1328 if (zoom == 0 || this.insane()) { 1325 1329 return Stream.empty(); // Tileset is either empty or too large 1326 1330 } else { 1327 return super.tilePositions(); 1331 return IntStream.rangeClosed(minX, maxX).mapToObj( 1332 x -> IntStream.rangeClosed(minY, maxY).mapToObj(y -> new TilePosition(x, y, zoom)) 1333 ).flatMap(Function.identity()); 1328 1334 } 1329 1335 } -
trunk/src/org/openstreetmap/josm/gui/layer/imagery/TilePosition.java
r11199 r11829 12 12 private final int y; 13 13 private final int zoom; 14 TilePosition(int x, int y, int zoom) { 14 15 public TilePosition(int x, int y, int zoom) { 15 16 this.x = x; 16 17 this.y = y;
Note:
See TracChangeset
for help on using the changeset viewer.