Changeset 34337 in osm for applications/editors/josm/plugins/imagery_offset_db/src
- Timestamp:
- 2018-06-22T22:40:09+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/imagery_offset_db/src/iodb
- Files:
-
- 2 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 -
applications/editors/josm/plugins/imagery_offset_db/src/iodb/SimpleOffsetQueryTask.java
r32528 r34337 9 9 import java.net.MalformedURLException; 10 10 import java.net.URL; 11 import java.nio.charset.StandardCharsets; 11 12 import java.util.Scanner; 12 13 import java.util.regex.Matcher; … … 139 140 String response = ""; 140 141 if (inp != null) { 141 Scanner sc = new Scanner(inp ).useDelimiter("\\A");142 Scanner sc = new Scanner(inp, StandardCharsets.UTF_8.name()).useDelimiter("\\A"); 142 143 response = sc.hasNext() ? sc.next() : ""; 143 144 }
Note:
See TracChangeset
for help on using the changeset viewer.