Changeset 19289 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2025-01-24T14:05:46+01:00 (3 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r19050 r19289 169 169 if (infoToAdd != null) { 170 170 layer = ImageryLayer.create(infoToAdd); 171 getLayerManager().addLayer(layer); 171 getLayerManager().addLayer(layer, false); 172 172 AlignImageryPanel.addNagPanelIfNeeded(infoToAdd); 173 173 } -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r19280 r19289 27 27 import java.io.IOException; 28 28 import java.net.MalformedURLException; 29 import java.net.URL; 29 import java.net.URI; 30 import java.net.URISyntaxException; 30 31 import java.time.Instant; 31 32 import java.util.ArrayList; … … 292 293 293 294 try { 294 if ("file".equalsIgnoreCase(new UR L(tileSource.getBaseUrl()).getProtocol())) {295 if ("file".equalsIgnoreCase(new URI(tileSource.getBaseUrl()).toURL().getProtocol())) { 295 296 tileLoader = new OsmTileLoader(this); 296 297 } 297 } catch (MalformedURLException e) { 298 } catch (URISyntaxException | MalformedURLException e) { 298 299 // ignore, assume that this is not a file 299 300 Logging.log(Logging.LEVEL_DEBUG, e); … … 515 516 if (tile != null) { 516 517 try { 517 new Notification(HttpClient.create(new UR L(tile.getUrl() + '/' + request))518 new Notification(HttpClient.create(new URI(tile.getUrl() + '/' + request).toURL()) 518 519 .connect().fetchContent()).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 519 } catch (IOException ex) { 520 } catch (URISyntaxException | IOException ex) { 520 521 Logging.error(ex); 521 522 } … … 1874 1875 @Override 1875 1876 public void visitBoundingBox(BoundingXYVisitor v) { 1877 if (this.getInfo() != null) { 1878 v.visit(this.getInfo().getBounds()); 1879 } 1876 1880 } 1877 1881
Note:
See TracChangeset
for help on using the changeset viewer.