Changeset 16290 in osm for applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java
- Timestamp:
- 2009-07-03T12:34:14+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java
r16162 r16290 43 43 lon.setText(java.lang.Double.toString(curPos.lon())); 44 44 45 LatLon ll1 = Main.map.mapView.getLatLon(0,0); 46 LatLon ll2 = Main.map.mapView.getLatLon(100,0); 47 double dist = ll1.greatCircleDistance(ll2); 48 zoomFactor = Main.map.mapView.getScale()/dist; 45 double dist = Main.map.mapView.getDist100Pixel(); 46 zoomFactor = 1/dist; 49 47 50 48 zm.setText(java.lang.Long.toString(Math.round(dist*100)/100)); … … 116 114 } 117 115 118 Main.map.mapView.zoomTo(Main.proj.latlon2eastNorth(ll), zoomFactor * zoomLvl); 116 Main.map.mapView.zoomToFactor(Main.proj.latlon2eastNorth(ll), zoomFactor * zoomLvl); 119 117 } 120 118
Note:
See TracChangeset
for help on using the changeset viewer.