Changeset 16860 in osm for applications/editors/josm/plugins/wmsplugin/src
- Timestamp:
- 2009-08-04T21:28:40+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r16781 r16860 80 80 WMSGrabber.getProjection(baseURL, true); 81 81 mv = Main.map.mapView; 82 resolution = mv.getDist100PixelText(); 82 83 pixelPerDegree = getPPD(); 83 84 … … 107 108 @Override public Icon getIcon() { 108 109 return icon; 109 }110 111 public String scale(){112 LatLon ll1 = mv.getLatLon(0,0);113 LatLon ll2 = mv.getLatLon(100,0);114 double dist = ll1.greatCircleDistance(ll2);115 return dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10+" m";116 110 } 117 111 … … 242 236 public void actionPerformed(ActionEvent ev) { 243 237 initializeImages(); 244 resolution = scale();238 resolution = mv.getDist100PixelText(); 245 239 pixelPerDegree = getPPD(); 246 240 mv.repaint();
Note:
See TracChangeset
for help on using the changeset viewer.