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


Ignore:
Timestamp:
2009-01-17T11:41:53+01:00 (16 years ago)
Author:
ulfl
Message:

start to show km for the map scaler at >= 2000 meters, the "1km" display is otherwise a bit course - this wasn't a problem with slow mappaint display before as no one noticed it ;-)

File:
1 edited

Legend:

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

    r1237 r1274  
    2929        LatLon ll2 = mv.getLatLon(100,0);
    3030        double dist = ll1.greatCircleDistance(ll2);
    31         String text = dist > 1000 ? Math.round(dist/100)/10 +" km" : (dist >= 1
     31        String text = dist >= 2000 ? Math.round(dist/100)/10 +" km" : (dist >= 1
    3232        ? Math.round(dist*10)/10 +" m" : "< 1 m");
    3333        Rectangle2D bound = g.getFontMetrics().getStringBounds(text, g);
Note: See TracChangeset for help on using the changeset viewer.