Changeset 11845 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-04-05T20:55:28+02:00 (8 years ago)
Author:
bastiK
Message:

see #7427 - better return type

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r11844 r11845  
    7171import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
    7272import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
     73import org.openstreetmap.gui.jmapviewer.interfaces.IProjected;
    7374import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
    7475import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
     
    14001401     */
    14011402    protected TileSet getTileSet(ProjectionBounds bounds, int zoom) {
    1402         EastNorth topLeftUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMin());
    1403         EastNorth botRightUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMax());
    1404         TileXY t1 = tileSource.projectedToTileXY(topLeftUnshifted.toProjected(), zoom);
    1405         TileXY t2 = tileSource.projectedToTileXY(botRightUnshifted.toProjected(), zoom);
     1403        IProjected topLeftUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMin());
     1404        IProjected botRightUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMax());
     1405        TileXY t1 = tileSource.projectedToTileXY(topLeftUnshifted, zoom);
     1406        TileXY t2 = tileSource.projectedToTileXY(botRightUnshifted, zoom);
    14061407        return new TileSet(t1, t2, zoom);
    14071408    }
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileCoordinateConverter.java

    r11844 r11845  
    5454     *
    5555     * @param en EastNorth coordinate representing a pixel on screen
    56      * @return EastNorth coordinate as it would e.g. be sent to a WMS server
     56     * @return IProjected coordinate as it would e.g. be sent to a WMS server
    5757     */
    58     public EastNorth shiftDisplayToServer(EastNorth en) {
    59         return en.subtract(settings.getDisplacement());
     58    public IProjected shiftDisplayToServer(EastNorth en) {
     59        return en.subtract(settings.getDisplacement()).toProjected();
    6060    }
    6161
Note: See TracChangeset for help on using the changeset viewer.