Ignore:
Timestamp:
2009-08-04T21:28:40+02:00 (15 years ago)
Author:
stoecker
Message:

fixed zoom level display bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java

    r16781 r16860  
    8080        WMSGrabber.getProjection(baseURL, true);
    8181        mv = Main.map.mapView;
     82        resolution = mv.getDist100PixelText();
    8283        pixelPerDegree = getPPD();
    8384
     
    107108    @Override public Icon getIcon() {
    108109        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";
    116110    }
    117111
     
    242236        public void actionPerformed(ActionEvent ev) {
    243237            initializeImages();
    244             resolution = scale();
     238            resolution = mv.getDist100PixelText();
    245239            pixelPerDegree = getPPD();
    246240            mv.repaint();
Note: See TracChangeset for help on using the changeset viewer.