Changeset 13897 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r13879 r13897 27 27 import org.openstreetmap.josm.data.imagery.LayerDetails; 28 28 import org.openstreetmap.josm.data.imagery.WMTSTileSource; 29 import org.openstreetmap.josm.data.imagery.WMTSTileSource.Layer; 29 30 import org.openstreetmap.josm.data.imagery.WMTSTileSource.WMTSGetCapabilitiesException; 30 31 import org.openstreetmap.josm.gui.ExtendedDialog; … … 111 112 String layerName = tileSource.getLayers().stream() 112 113 .filter(x -> x.getIdentifier().equals(layerId.getLayerName())) 113 .map( x -> x.getUserTitle())114 .map(Layer::getUserTitle) 114 115 .findFirst() 115 116 .orElse(""); -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r13889 r13897 387 387 } 388 388 389 /** 390 * Returns best zoom level. 391 * @return best zoom level 392 */ 389 393 public int getBestZoom() { 390 394 double factor = getScaleFactor(1); // check the ratio between area of tilesize at zoom 1 to current view … … 424 428 protected final Tile tile; 425 429 426 privateAbstractTileAction(String name, AbstractTileSourceLayer<?> layer, Tile tile) {430 AbstractTileAction(String name, AbstractTileSourceLayer<?> layer, Tile tile) { 427 431 super(name); 428 432 this.layer = layer; 429 433 this.tile = tile; 430 434 } 431 432 @Override433 public abstract void actionPerformed(ActionEvent arg0);434 435 } 435 436 … … 441 442 } 442 443 443 private String getSizeString(int size) {444 private static String getSizeString(int size) { 444 445 return new StringBuilder().append(size).append('x').append(size).toString(); 445 446 } … … 525 526 } 526 527 527 private void sendOsmTileRequest(Tile tile, String request) {528 private static void sendOsmTileRequest(Tile tile, String request) { 528 529 if (tile != null) { 529 530 try { … … 544 545 @Override 545 546 public void actionPerformed(ActionEvent e) { 546 layer.sendOsmTileRequest(tile, "status");547 sendOsmTileRequest(tile, "status"); 547 548 } 548 549 } … … 556 557 @Override 557 558 public void actionPerformed(ActionEvent e) { 558 layer.sendOsmTileRequest(tile, "dirty");559 sendOsmTileRequest(tile, "dirty"); 559 560 } 560 561 } -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java
r13872 r13897 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertTrue; 5 6 6 7 import java.nio.file.Files; … … 126 127 assertEquals("b8e36d51-119a-423b-b156-d744d54123d5", wmsImageryInfo.getCustomHttpHeaders().get("X-WAAPI-TOKEN")); 127 128 assertEquals("b8e36d51-119a-423b-b156-d744d54123d5", tileSource.getHeaders().get("X-WAAPI-TOKEN")); 128 assert Equals(true,wmsImageryInfo.isGeoreferenceValid());129 assertTrue(wmsImageryInfo.isGeoreferenceValid()); 129 130 tileServer.verify( 130 131 WireMock.getRequestedFor(WireMock.urlEqualTo("/capabilities?SERVICE=WMS&REQUEST=GetCapabilities")) … … 143 144 + "BBOX=20037506.6204108,-60112521.5836107,60112521.5836107,-20037506.6204108", 144 145 tileSource.getTileUrl(1, 1, 1)); 145 146 146 } 147 147 }
Note:
See TracChangeset
for help on using the changeset viewer.