Changeset 16687 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-07-26T11:16:21+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/build.xml
r16628 r16687 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="18 15"/>27 <attribute name="Plugin-Mainversion" value="1823"/> 28 28 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 29 29 </manifest> -
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java
r16419 r16687 22 22 import org.openstreetmap.josm.data.ProjectionBounds; 23 23 import org.openstreetmap.josm.data.coor.LatLon; 24 import org.openstreetmap.josm.gui. NavigatableComponent;24 import org.openstreetmap.josm.gui.MapView; 25 25 import org.openstreetmap.josm.tools.GBC; 26 26 import org.openstreetmap.josm.tools.OsmUrlToBounds; … … 40 40 private double zoomFactor = 0; 41 41 public void showJumpToDialog() { 42 LatLon curPos=Main.proj.eastNorth2latlon(Main.map.mapView.getCenter()); 42 MapView mv = Main.map.mapView; 43 LatLon curPos=mv.getProjection().eastNorth2latlon(mv.getCenter()); 43 44 lat.setText(java.lang.Double.toString(curPos.lat())); 44 45 lon.setText(java.lang.Double.toString(curPos.lon())); 45 46 46 double dist = Main.map.mapView.getDist100Pixel();47 double dist = mv.getDist100Pixel(); 47 48 zoomFactor = 1/dist; 48 49 … … 115 116 } 116 117 117 Main.map.mapView.zoomToFactor(Main.proj.latlon2eastNorth(ll), zoomFactor * zoomLvl);118 mv.zoomToFactor(mv.getProjection().latlon2eastNorth(ll), zoomFactor * zoomLvl); 118 119 } 119 120 … … 165 166 */ 166 167 public int getZoom(double scale) { 167 double sizex = scale * Main.map.mapView.getWidth(); 168 double sizey = scale * Main.map.mapView.getHeight(); 169 ProjectionBounds b = Main.proj.getWorldBounds(); 168 MapView mv = Main.map.mapView; 169 double sizex = scale * mv.getWidth(); 170 double sizey = scale * mv.getHeight(); 171 ProjectionBounds b = mv.getMaxProjectionBounds(); 170 172 for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2) { 171 173 if (sizex > b.max.east() || sizey > b.max.north())
Note:
See TracChangeset
for help on using the changeset viewer.