Changeset 7864 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
- Timestamp:
- 2014-12-20T22:43:20+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r7801 r7864 592 592 public static double level2scale(int lvl) { 593 593 if (lvl < 0) 594 throw new IllegalArgumentException( );594 throw new IllegalArgumentException("lvl must be >= 0 but is "+lvl); 595 595 // preliminary formula - map such that mapnik imagery tiles of the same 596 596 // or similar level are displayed at the given scale … … 600 600 public static int scale2level(double scale) { 601 601 if (scale < 0) 602 throw new IllegalArgumentException( );602 throw new IllegalArgumentException("scale must be >= 0 but is "+scale); 603 603 return (int) Math.floor(Math.log(2 * Math.PI * R / 2.56 / scale) / Math.log(2)); 604 604 }
Note:
See TracChangeset
for help on using the changeset viewer.