Ignore:
Timestamp:
2009-07-03T12:34:14+02:00 (15 years ago)
Author:
stoecker
Message:

adapted plugins to JOSm 1722, UtilsPlugin still has a problem

Location:
applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxLayer.java

    r15186 r16290  
    113113            for(Node n: dataSet.nodes) {
    114114                if (!n.deleted) {
    115                     LatLon c = n.coor;
    116                     Point pnt = Main.map.mapView.getPoint(Main.proj.latlon2eastNorth(c));
     115                    Point pnt = Main.map.mapView.getPoint(n.getEastNorth());
    117116                    g.drawOval(pnt.x - 2, pnt.y - 2, 4, 4);
    118117                }
     
    166165                doneNodes.add(n);
    167166
    168                 WayPoint wpt = new WayPoint(n.coor);
     167                WayPoint wpt = new WayPoint(n.getCoor());
    169168                if (anonTime) {
    170169                    wpt.attr.put("time", "1970-01-01T00:00:00");
     
    184183            Date tstamp = n.getTimestamp();
    185184
    186             WayPoint wpt = new WayPoint(n.coor);
     185            WayPoint wpt = new WayPoint(n.getCoor());
    187186            if (anonTime) {
    188187                wpt.attr.put("time", "1970-01-01T00:00:00");
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java

    r14245 r16290  
    6464            Point pointReleased = e.getPoint();
    6565
    66             //prepare vars
    67             EastNorth en;
    68             double scale = Main.map.mapView.getScale();
    69             EastNorth center = Main.map.mapView.getCenter(); //Center n/e coordinate of the desired screen center.
    70             int width = Main.map.mapView.getWidth();
    71             int height = Main.map.mapView.getHeight();
    7266            Rectangle r = createRect(pointReleased, pointPressed);
    7367
    7468            //go through nodes and mark the ones in the selection rect as deleted
    7569            for (Node n: dataSet.nodes) {
    76                 en = n.eastNorth;
    77                 //calculate point on screen from node n
    78                 double x = (en.east()-center.east())/scale + width/2;
    79                 double y = (center.north()-en.north())/scale + height/2;
    80                 Point p = new Point((int)x,(int)y);
     70                Point p = Main.map.mapView.getPoint(n.getEastNorth());
    8171                if (r.contains(p)) {
    8272                    n.deleted = true; //only set as deleted. this makes reset to beginning possible
Note: See TracChangeset for help on using the changeset viewer.