Changeset 11845 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-04-05T20:55:28+02:00 (8 years ago)
- 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 71 71 import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader; 72 72 import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate; 73 import org.openstreetmap.gui.jmapviewer.interfaces.IProjected; 73 74 import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource; 74 75 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache; … … 1400 1401 */ 1401 1402 protected TileSet getTileSet(ProjectionBounds bounds, int zoom) { 1402 EastNorthtopLeftUnshifted = coordinateConverter.shiftDisplayToServer(bounds.getMin());1403 EastNorthbotRightUnshifted = 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); 1406 1407 return new TileSet(t1, t2, zoom); 1407 1408 } -
trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileCoordinateConverter.java
r11844 r11845 54 54 * 55 55 * @param en EastNorth coordinate representing a pixel on screen 56 * @return EastNorthcoordinate as it would e.g. be sent to a WMS server56 * @return IProjected coordinate as it would e.g. be sent to a WMS server 57 57 */ 58 public EastNorthshiftDisplayToServer(EastNorth en) {59 return en.subtract(settings.getDisplacement()) ;58 public IProjected shiftDisplayToServer(EastNorth en) { 59 return en.subtract(settings.getDisplacement()).toProjected(); 60 60 } 61 61
Note:
See TracChangeset
for help on using the changeset viewer.