Changeset 33774 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/GetImageryOffsetAction.java
- Timestamp:
- 2017-11-05T19:09:17+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/GetImageryOffsetAction.java
r33547 r33774 18 18 import org.openstreetmap.josm.Main; 19 19 import org.openstreetmap.josm.actions.JosmAction; 20 import org.openstreetmap.josm.data.coor.CoordinateFormat;21 20 import org.openstreetmap.josm.data.coor.LatLon; 21 import org.openstreetmap.josm.data.coor.conversion.DecimalDegreesCoordinateFormat; 22 22 import org.openstreetmap.josm.data.projection.Projection; 23 23 import org.openstreetmap.josm.gui.MainApplication; … … 59 59 Projection proj = MainApplication.getMap().mapView.getProjection(); 60 60 LatLon center = proj.eastNorth2latlon(MainApplication.getMap().mapView.getCenter()); 61 AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer(); 61 AbstractTileSourceLayer<?> layer = ImageryOffsetTools.getTopImageryLayer(); 62 62 String imagery = ImageryOffsetTools.getImageryID(layer); 63 63 if (imagery == null) … … 77 77 if (!MainApplication.isDisplayingMapView() || !MainApplication.getMap().isVisible()) 78 78 state = false; 79 AbstractTileSourceLayer layer = ImageryOffsetTools.getTopImageryLayer(); 79 AbstractTileSourceLayer<?> layer = ImageryOffsetTools.getTopImageryLayer(); 80 80 if (ImageryOffsetTools.getImageryID(layer) == null) 81 81 state = false; … … 131 131 * @param imagery Imagery ID for the layer. 132 132 */ 133 DownloadOffsetsTask(LatLon center, AbstractTileSourceLayer layer, String imagery) { 133 DownloadOffsetsTask(LatLon center, AbstractTileSourceLayer<?> layer, String imagery) { 134 134 super(null, tr("Loading imagery offsets...")); 135 135 try { 136 String query = "get?lat=" + center.latToString(CoordinateFormat.DECIMAL_DEGREES)137 + "&lon=" + center.lonToString(CoordinateFormat.DECIMAL_DEGREES)136 String query = "get?lat=" + DecimalDegreesCoordinateFormat.INSTANCE.latToString(center) 137 + "&lon=" + DecimalDegreesCoordinateFormat.INSTANCE.lonToString(center) 138 138 + "&imagery=" + URLEncoder.encode(imagery, "UTF8"); 139 int radius = Main.pref.getInt eger("iodb.radius", -1);139 int radius = Main.pref.getInt("iodb.radius", -1); 140 140 if (radius > 0) 141 141 query = query + "&radius=" + radius;
Note:
See TracChangeset
for help on using the changeset viewer.
