Changeset 16419 in osm for applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java
- Timestamp:
- 2009-07-09T23:41:51+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java
r16290 r16419 20 20 import org.openstreetmap.josm.actions.JosmAction; 21 21 import org.openstreetmap.josm.data.Bounds; 22 import org.openstreetmap.josm.data.ProjectionBounds; 22 23 import org.openstreetmap.josm.data.coor.LatLon; 23 24 import org.openstreetmap.josm.gui.NavigatableComponent; … … 166 167 double sizex = scale * Main.map.mapView.getWidth(); 167 168 double sizey = scale * Main.map.mapView.getHeight(); 168 for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2) 169 if (sizex > NavigatableComponent.world.east() || sizey > NavigatableComponent.world.north()) 169 ProjectionBounds b = Main.proj.getWorldBounds(); 170 for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2) { 171 if (sizex > b.max.east() || sizey > b.max.north()) 170 172 return zoom; 173 } 171 174 return 32; 172 175 }
Note:
See TracChangeset
for help on using the changeset viewer.