Ignore:
Timestamp:
2009-07-09T23:41:51+02:00 (16 years ago)
Author:
guggis
Message:

updated for core r1758 after rework of projection handling and of editor layer access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java

    r16290 r16419  
    2020import org.openstreetmap.josm.actions.JosmAction;
    2121import org.openstreetmap.josm.data.Bounds;
     22import org.openstreetmap.josm.data.ProjectionBounds;
    2223import org.openstreetmap.josm.data.coor.LatLon;
    2324import org.openstreetmap.josm.gui.NavigatableComponent;
     
    166167        double sizex = scale * Main.map.mapView.getWidth();
    167168        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())
    170172                return zoom;
     173        }
    171174        return 32;
    172175    }
Note: See TracChangeset for help on using the changeset viewer.