Changeset 18911 in josm for trunk/src


Ignore:
Timestamp:
2023-12-14T01:09:48+01:00 (12 months ago)
Author:
taylor.smock
Message:

Fix #23113: Use default methods from JMapViewer

Location:
trunk/src/org/openstreetmap/josm/data/imagery
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java

    r18871 r18911  
    99
    1010import org.openstreetmap.gui.jmapviewer.Projected;
    11 import org.openstreetmap.gui.jmapviewer.Tile;
    1211import org.openstreetmap.gui.jmapviewer.TileXY;
    1312import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
     
    105104
    106105    @Override
    107     public ICoordinate tileXYToLatLon(Tile tile) {
    108         return tileXYToLatLon(tile.getXtile(), tile.getYtile(), tile.getZoom());
    109     }
    110 
    111     @Override
    112     public ICoordinate tileXYToLatLon(TileXY xy, int zoom) {
    113         return tileXYToLatLon(xy.getXIndex(), xy.getYIndex(), zoom);
    114     }
    115 
    116     @Override
    117106    public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
    118107        return CoordinateConversion.llToCoor(tileProjection.eastNorth2latlon(getTileEastNorth(x, y, zoom)));
     
    131120        EastNorth enPoint = tileProjection.latlon2eastNorth(new LatLon(lat, lon));
    132121        return eastNorthToTileXY(enPoint, zoom);
    133     }
    134 
    135     @Override
    136     public TileXY latLonToTileXY(ICoordinate point, int zoom) {
    137         return latLonToTileXY(point.getLat(), point.getLon(), zoom);
    138122    }
    139123
     
    166150                (int) Math.round((anchorPosition.north() - point.north()) / scale)
    167151                );
    168     }
    169 
    170     @Override
    171     public Point latLonToXY(ICoordinate point, int zoom) {
    172         return latLonToXY(point.getLat(), point.getLon(), zoom);
    173     }
    174 
    175     @Override
    176     public ICoordinate xyToLatLon(Point point, int zoom) {
    177         return xyToLatLon(point.x, point.y, zoom);
    178152    }
    179153
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r18871 r18911  
    931931
    932932    @Override
    933     public ICoordinate tileXYToLatLon(Tile tile) {
    934         return tileXYToLatLon(tile.getXtile(), tile.getYtile(), tile.getZoom());
    935     }
    936 
    937     @Override
    938     public ICoordinate tileXYToLatLon(TileXY xy, int zoom) {
    939         return tileXYToLatLon(xy.getXIndex(), xy.getYIndex(), zoom);
    940     }
    941 
    942     @Override
    943933    public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
    944934        TileMatrix matrix = getTileMatrix(zoom);
     
    967957
    968958    @Override
    969     public TileXY latLonToTileXY(ICoordinate point, int zoom) {
    970         return latLonToTileXY(point.getLat(), point.getLon(), zoom);
    971     }
    972 
    973     @Override
    974959    public int getTileXMax(int zoom) {
    975960        return getTileXMax(zoom, tileProjection);
     
    993978                    (int) Math.round((matrix.topLeftCorner.north() - point.north()) / scale)
    994979                );
    995     }
    996 
    997     @Override
    998     public Point latLonToXY(ICoordinate point, int zoom) {
    999         return latLonToXY(point.getLat(), point.getLon(), zoom);
    1000     }
    1001 
    1002     @Override
    1003     public Coordinate xyToLatLon(Point point, int zoom) {
    1004         return xyToLatLon(point.x, point.y, zoom);
    1005980    }
    1006981
Note: See TracChangeset for help on using the changeset viewer.