Ignore:
Timestamp:
2017-04-05T20:38:08+02:00 (7 years ago)
Author:
bastiK
Message:

see #7427 - avoid roundtrip conversion EastNorth -> LatLon -> EastNorth

This circumvents LatLon clamping, so may have an impact on display near lon=+/-180 degrees

File:
1 edited

Legend:

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

    r11841 r11844  
    4848    private MapViewPoint pos(IProjected p) {
    4949        return mapView.getState().getPointFor(new EastNorth(p)).add(settings.getDisplacement());
     50    }
     51
     52    /**
     53     * Apply reverse shift to EastNorth coordinate.
     54     *
     55     * @param en EastNorth coordinate representing a pixel on screen
     56     * @return EastNorth coordinate as it would e.g. be sent to a WMS server
     57     */
     58    public EastNorth shiftDisplayToServer(EastNorth en) {
     59        return en.subtract(settings.getDisplacement());
    5060    }
    5161
Note: See TracChangeset for help on using the changeset viewer.