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

fixed zoom level display bug

Location:
applications/editors/josm/plugins/wmsplugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/build.xml

    r16781 r16860  
    2626                <attribute name="Plugin-Description" value="Display georeferenced images as background in JOSM (WMS servers, Yahoo, ...)."/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WMSPlugin"/>
    28                 <attribute name="Plugin-Mainversion" value="1893"/>
     28                <attribute name="Plugin-Mainversion" value="1908"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030                <attribute name="de_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/DE:JOSM/Plugins/WMSPlugin"/>
  • 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.