Changeset 25935 in osm for applications/editors


Ignore:
Timestamp:
2011-05-02T20:54:39+02:00 (13 years ago)
Author:
jttt
Message:

Adapt to latest josm

Location:
applications/editors/josm/plugins/wms-turbo-challenge2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wms-turbo-challenge2/build.xml

    r25191 r25935  
    6666                <attribute name="Plugin-Icon" value="images/wmsracer.png"/>
    6767                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMS_Racer"/>
    68                 <attribute name="Plugin-Mainversion" value="3835"/>
     68                <attribute name="Plugin-Mainversion" value="4065"/>
    6969                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    7070            </manifest>
  • applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java

    r23190 r25935  
    4343        ProjectionBounds parent_bounds = parent.getProjectionBounds();
    4444        max_east_west =
    45             parent_bounds.max.east() - parent_bounds.min.east();
     45            parent_bounds.maxEast - parent_bounds.minEast;
    4646    }
    4747
     
    4949        view_bounds = bounds;
    5050
    51         if (bounds.max.east() - bounds.min.east() > max_east_west) {
    52             max_east_west = bounds.max.east() - bounds.min.east();
     51        if (bounds.maxEast - bounds.minEast > max_east_west) {
     52            max_east_west = bounds.maxEast - bounds.minEast;
    5353
    5454            /* We need to set the parent MapView's bounds (i.e.
     
    7575                parent.getProjectionBounds();
    7676            max_east_west =
    77                 new_bounds.max.east() - new_bounds.min.east();
     77                new_bounds.maxEast - new_bounds.minEast;
    7878        }
    7979
    80         Point vmin = getPoint(bounds.min);
    81         Point vmax = getPoint(bounds.max);
     80        Point vmin = getPoint(bounds.getMin());
     81        Point vmax = getPoint(bounds.getMax());
    8282        int w = vmax.x + 1;
    8383        int h = vmin.y + 1;
     
    105105
    106106    public Point getPoint(EastNorth p) {
    107         double x = p.east() - view_bounds.min.east();
    108         double y = view_bounds.max.north() - p.north();
     107        double x = p.east() - view_bounds.minEast;
     108        double y = view_bounds.maxNorth - p.north();
    109109        x /= this.scale;
    110110        y /= this.scale;
     
    115115    public EastNorth getEastNorth(int x, int y) {
    116116        return new EastNorth(
    117             view_bounds.min.east() + x * this.scale,
    118             view_bounds.min.north() - y * this.scale);
     117            view_bounds.minEast + x * this.scale,
     118            view_bounds.minNorth - y * this.scale);
    119119    }
    120120
Note: See TracChangeset for help on using the changeset viewer.