Changeset 29531 in osm for applications/editors/josm/plugins/ImportImagePlugin/src
- Timestamp:
- 2013-04-23T13:17:15+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java ¶
r28954 r29531 162 162 163 163 // Position image at the right graphical place 164 EastNorth center = Main.map.mapView.getCenter();165 EastNorth leftop = Main.map.mapView.getEastNorth(0, 0);166 double pixel_per_east_unit = ( Main.map.mapView.getWidth() / 2.0)164 EastNorth center = mv.getCenter(); 165 EastNorth leftop = mv.getEastNorth(0, 0); 166 double pixel_per_east_unit = (mv.getWidth() / 2.0) 167 167 / (center.east() - leftop.east()); 168 double pixel_per_north_unit = ( Main.map.mapView.getHeight() / 2.0)168 double pixel_per_north_unit = (mv.getHeight() / 2.0) 169 169 / (leftop.north() - center.north()); 170 170 … … 182 182 183 183 // Determine scale to fit JOSM extents 184 ProjectionBounds projbounds = Main.map.mapView 185 .getProjectionBounds(); 184 ProjectionBounds projbounds = mv.getProjectionBounds(); 186 185 187 186 double width = projbounds.maxEast - projbounds.minEast; … … 193 192 / height; 194 193 195 double pixels4bbox_width = ratio_x * Main.map.mapView.getWidth();196 double pixels4bbox_height = ratio_y * Main.map.mapView.getHeight();194 double pixels4bbox_width = ratio_x * mv.getWidth(); 195 double pixels4bbox_height = ratio_y * mv.getHeight(); 197 196 198 197 // Scale image to JOSM extents
Note:
See TracChangeset
for help on using the changeset viewer.