Changeset 16290 in osm for applications/editors/josm/plugins/utilsplugin
- Timestamp:
- 2009-07-03T12:34:14+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/build.xml
r16162 r16290 25 25 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 26 26 <attribute name="Plugin-Description" value="Several utilities that make your life easier: e.g. simplify way, join areas, jump to position."/> 27 <attribute name="Plugin-Mainversion" value="1 638"/>27 <attribute name="Plugin-Mainversion" value="1722"/> 28 28 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 29 29 </manifest> -
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.