Changeset 2327 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2009-10-27T01:21:32+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r1797 r2327 59 59 static public int getZoom(Bounds b) { 60 60 // 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())); 64 64 int zoom = 0; 65 65 while (zoom <= 20) {
Note:
See TracChangeset
for help on using the changeset viewer.