Changeset 1740 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-07-06T16:35:08+02:00 (15 years ago)
Author:
stoecker
Message:

fixed #2846 - wrong rounding

File:
1 edited

Legend:

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

    r1724 r1740  
    8181        // Truncate lat and lon to something more sensible
    8282        int decimals = (int) Math.pow(10, (zoom / 3));
    83         double lat = (Math.round(pos.lat() * decimals))/decimals;
    84         double lon = (Math.round(pos.lon() * decimals))/decimals;
     83        double lat = (Math.round(pos.lat() * decimals));
     84        lat /= decimals;
     85        double lon = (Math.round(pos.lon() * decimals));
     86        lon /= decimals;
    8587        return new String("http://www.openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom);
    8688    }
Note: See TracChangeset for help on using the changeset viewer.