- Timestamp:
- 2006-03-19T12:03:22+01:00 (18 years ago)
- Location:
- src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/MapMover.java
r42 r65 109 109 public void mouseWheelMoved(MouseWheelEvent e) { 110 110 double zoom = Math.max(0.1, 1 + e.getWheelRotation()/5.0); 111 nc.zoomTo(nc.getCenter(), nc.getScale()*zoom); 111 double zoomfactor = (zoom -1)/2+1; 112 int newHalfWidth = (int) (nc.getWidth()*zoomfactor - nc.getWidth()/2); 113 int centerx = e.getX() - (e.getX()-nc.getWidth()/2)*newHalfWidth*2/nc.getWidth(); 114 int newHalfHeight = (int) (nc.getHeight()*zoomfactor - nc.getHeight()/2); 115 int centery = e.getY() - (e.getY()-nc.getHeight()/2)*newHalfHeight*2/nc.getHeight(); 116 GeoPoint newCenter = nc.getPoint(centerx, centery, false); 117 nc.zoomTo(newCenter, nc.getScale()*zoom); 112 118 } 113 119 -
src/org/openstreetmap/josm/gui/NavigatableComponent.java
r64 r65 149 149 return minPrimitive; 150 150 151 // for whole wa ies, try the waies first151 // for whole ways, try the ways first 152 152 minDistanceSq = Double.MAX_VALUE; 153 153 if (!lsInsteadWay) { 154 for (Way t: Main.main.ds.waies) {155 if ( t.isDeleted())154 for (Way w : Main.main.ds.waies) { 155 if (w.isDeleted()) 156 156 continue; 157 for (LineSegment ls : t.segments) {157 for (LineSegment ls : w.segments) { 158 158 if (ls.isDeleted()) 159 159 continue; … … 166 166 if (perDist < 100 && minDistanceSq > perDist && a < c+100 && b < c+100) { 167 167 minDistanceSq = perDist; 168 minPrimitive = t;168 minPrimitive = w; 169 169 } 170 170 } -
src/org/openstreetmap/josm/io/OsmReader.java
r64 r65 96 96 LineSegment ls = lineSegments.get(getLong(atts, "id")); 97 97 if (ls == null) 98 fatalError(new SAXParseException("Line segment "+getLong(atts, "id")+" has not been transfered before.", null));98 fatalError(new SAXParseException("Line segment "+getLong(atts, "id")+" has not been transfered before.", null)); 99 99 ((Way)current).segments.add(ls); 100 100 } -
src/org/openstreetmap/josm/io/OsmServerReader.java
r64 r65 48 48 */ 49 49 public Collection<Collection<GeoPoint>> parseRawGps() throws IOException, JDOMException { 50 String url = Main.pref.osmDataServer+"/0.3/ waypoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=";50 String url = Main.pref.osmDataServer+"/0.3/trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page="; 51 51 Collection<Collection<GeoPoint>> data = new LinkedList<Collection<GeoPoint>>(); 52 52 Collection<GeoPoint> list = new LinkedList<GeoPoint>();
Note:
See TracChangeset
for help on using the changeset viewer.