Changeset 11829 in josm


Ignore:
Timestamp:
2017-04-03T13:59:39+02:00 (8 months ago)
Author:
bastiK
Message:

see #7427 - move TileRange class to jmapviewer

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  
    4242import java.util.function.Function;
    4343import java.util.stream.Collectors;
     44import java.util.stream.IntStream;
    4445import java.util.stream.Stream;
    4546
     
    6162import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
    6263import org.openstreetmap.gui.jmapviewer.Tile;
     64import org.openstreetmap.gui.jmapviewer.TileRange;
    6365import org.openstreetmap.gui.jmapviewer.TileXY;
    6466import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
     
    9395import org.openstreetmap.josm.gui.layer.imagery.TileCoordinateConverter;
    9496import org.openstreetmap.josm.gui.layer.imagery.TilePosition;
    95 import org.openstreetmap.josm.gui.layer.imagery.TileRange;
    9697import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings;
    9798import org.openstreetmap.josm.gui.layer.imagery.TileSourceDisplaySettings.DisplaySettingsChangeEvent;
     
    13201321        }
    13211322
    1322         @Override
     1323        /**
     1324         * Gets a stream of all tile positions in this set
     1325         * @return A stream of all positions
     1326         */
    13231327        public Stream<TilePosition> tilePositions() {
    1324             if (this.insane()) {
     1328            if (zoom == 0 || this.insane()) {
    13251329                return Stream.empty(); // Tileset is either empty or too large
    13261330            } 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());
    13281334            }
    13291335        }
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/TilePosition.java

    r11199 r11829  
    1212    private final int y;
    1313    private final int zoom;
    14     TilePosition(int x, int y, int zoom) {
     14
     15    public TilePosition(int x, int y, int zoom) {
    1516        this.x = x;
    1617        this.y = y;
Note: See TracChangeset for help on using the changeset viewer.