Ignore:
Timestamp:
2009-10-27T01:21:32+01:00 (15 years ago)
Author:
Gubaer
Message:

Cleanup in download logic (less global, more encapsulation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r1797 r2327  
    5959    static public int getZoom(Bounds b) {
    6060        // convert to mercator (for calculation of zoom only)
    61         double latMin = Math.log(Math.tan(Math.PI/4.0+b.min.lat()/180.0*Math.PI/2.0))*180.0/Math.PI;
    62         double latMax = Math.log(Math.tan(Math.PI/4.0+b.max.lat()/180.0*Math.PI/2.0))*180.0/Math.PI;
    63         double size = Math.max(Math.abs(latMax-latMin), Math.abs(b.max.lon()-b.min.lon()));
     61        double latMin = Math.log(Math.tan(Math.PI/4.0+b.getMin().lat()/180.0*Math.PI/2.0))*180.0/Math.PI;
     62        double latMax = Math.log(Math.tan(Math.PI/4.0+b.getMax().lat()/180.0*Math.PI/2.0))*180.0/Math.PI;
     63        double size = Math.max(Math.abs(latMax-latMin), Math.abs(b.getMax().lon()-b.getMin().lon()));
    6464        int zoom = 0;
    6565        while (zoom <= 20) {
Note: See TracChangeset for help on using the changeset viewer.