Ignore:
Timestamp:
2009-07-03T12:34:14+02:00 (16 years ago)
Author:
stoecker
Message:

adapted plugins to JOSm 1722, UtilsPlugin still has a problem

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

Legend:

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

    r16162 r16290  
    2525                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    2626                <attribute name="Plugin-Description" value="Several utilities that make your life easier: e.g. simplify way, join areas, jump to position."/>
    27                 <attribute name="Plugin-Mainversion" value="1638"/>
     27                <attribute name="Plugin-Mainversion" value="1722"/>
    2828                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    2929            </manifest>
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/JumpToAction.java

    r16162 r16290  
    4343        lon.setText(java.lang.Double.toString(curPos.lon()));
    4444
    45         LatLon ll1 = Main.map.mapView.getLatLon(0,0);
    46         LatLon ll2 = Main.map.mapView.getLatLon(100,0);
    47         double dist = ll1.greatCircleDistance(ll2);
    48         zoomFactor = Main.map.mapView.getScale()/dist;
     45        double dist = Main.map.mapView.getDist100Pixel();
     46        zoomFactor = 1/dist;
    4947
    5048        zm.setText(java.lang.Long.toString(Math.round(dist*100)/100));
     
    116114        }
    117115
    118         Main.map.mapView.zoomTo(Main.proj.latlon2eastNorth(ll), zoomFactor * zoomLvl);
     116        Main.map.mapView.zoomToFactor(Main.proj.latlon2eastNorth(ll), zoomFactor * zoomLvl);
    119117    }
    120118
Note: See TracChangeset for help on using the changeset viewer.