Changeset 1285 in josm for trunk/src/org


Ignore:
Timestamp:
2009-01-17T22:38:52+01:00 (16 years ago)
Author:
stoecker
Message:

close #2030. Patch by bruce89

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java

    r1169 r1285  
    165165            zoom++;
    166166        }
    167         showUrl.setText("http://www.openstreetmap.org/index.html?mlat="+lat+"&mlon="+lon+"&zoom="+zoom);
     167        // Truncate lat and lon to something more sensible
     168        int decimals = (int) Math.pow(10, (zoom / 3));
     169        lat = Math.round(lat * decimals);
     170        lat /= decimals;
     171        lon = Math.round(lon * decimals);
     172        lon /= decimals;
     173        showUrl.setText("http://www.openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom);
    168174    }
    169175
Note: See TracChangeset for help on using the changeset viewer.