Changeset 34337 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java
- Timestamp:
- 2018-06-22T22:40:09+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialogButton.java
r33309 r34337 127 127 */ 128 128 private double[] getLengthAndDirection(ImageryOffset offset) { 129 AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer(); 129 AbstractTileSourceLayer<?> layer = ImageryOffsetTools.getTopImageryLayer(); 130 130 double[] dxy = layer == null ? new double[] {0.0, 0.0} : 131 131 new double[] {layer.getDisplaySettings().getDx(), layer.getDisplaySettings().getDy()}; … … 144 144 LatLon correctedCenterLL = proj.eastNorth2latlon(pos.add(-dx, -dy)); 145 145 double length = correctedCenterLL.greatCircleDistance(offset.getImageryPos()); 146 double direction = length < 1e-2 ? 0.0 : correctedCenterLL. heading(offset.getImageryPos());146 double direction = length < 1e-2 ? 0.0 : -correctedCenterLL.bearing(offset.getImageryPos()); 147 147 if (direction < 0) 148 148 direction += Math.PI * 2; … … 253 253 public void updateIcon(LatLon from) { 254 254 distance = from.greatCircleDistance(to); 255 direction = to.heading(from);255 direction = -to.bearing(from); 256 256 } 257 257
Note:
See TracChangeset
for help on using the changeset viewer.