Changeset 16290 in osm for applications/editors/josm/plugins/editgpx/src/org/openstreetmap
- Timestamp:
- 2009-07-03T12:34:14+02:00 (15 years ago)
- 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 113 113 for(Node n: dataSet.nodes) { 114 114 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()); 117 116 g.drawOval(pnt.x - 2, pnt.y - 2, 4, 4); 118 117 } … … 166 165 doneNodes.add(n); 167 166 168 WayPoint wpt = new WayPoint(n. coor);167 WayPoint wpt = new WayPoint(n.getCoor()); 169 168 if (anonTime) { 170 169 wpt.attr.put("time", "1970-01-01T00:00:00"); … … 184 183 Date tstamp = n.getTimestamp(); 185 184 186 WayPoint wpt = new WayPoint(n. coor);185 WayPoint wpt = new WayPoint(n.getCoor()); 187 186 if (anonTime) { 188 187 wpt.attr.put("time", "1970-01-01T00:00:00"); -
applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/EditGpxMode.java
r14245 r16290 64 64 Point pointReleased = e.getPoint(); 65 65 66 //prepare vars67 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();72 66 Rectangle r = createRect(pointReleased, pointPressed); 73 67 74 68 //go through nodes and mark the ones in the selection rect as deleted 75 69 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()); 81 71 if (r.contains(p)) { 82 72 n.deleted = true; //only set as deleted. this makes reset to beginning possible
Note:
See TracChangeset
for help on using the changeset viewer.