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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.