Changeset 9902 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r9889 r9902 388 388 if (moveReaderToTag(reader, new QName[] {new QName(OWS_NS_URL, "Identifier")})) { 389 389 layer.style = reader.getElementText(); 390 tagStack.push(reader.getName()); // keep tagStack in sync 390 391 } 391 tagStack.push(reader.getName()); // keep tagStack in sync392 392 } else if (new QName(WMTS_NS_URL, "TileMatrixSetLink").equals(reader.getName())) { 393 393 layer.tileMatrixSetLinks.add(praseTileMatrixSetLink(reader)); -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r9820 r9902 33 33 private ImageryInfo testImagery12168 = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12168-WMTSCapabilities.xml"); 34 34 private ImageryInfo testLotsOfLayers = getImagery(TestUtils.getTestDataRoot() + "wmts/getCapabilities-lots-of-layers.xml"); 35 private ImageryInfo testDuplicateTags = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-identifier.xml"); 36 private ImageryInfo testMissingStyleIdentifer = getImagery(TestUtils.getTestDataRoot() + "wmts/bug12573-wmts-missing-style-identifier.xml"); 35 37 36 38 /** … … 243 245 } 244 246 247 @Test 248 public void testPraserForDuplicateTags() throws Exception { 249 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 250 WMTSTileSource testSource = new WMTSTileSource(testDuplicateTags); 251 testSource.initProjection(Main.getProjection()); 252 assertEquals( 253 "http://tile.informatievlaanderen.be/ws/raadpleegdiensten/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=grb_bsk&" 254 + "STYLE=&FORMAT=image/png&tileMatrixSet=GoogleMapsVL&tileMatrix=1&tileRow=1&tileCol=1", 255 testSource.getTileUrl(1, 1, 1) 256 ); 257 } 258 259 @Test 260 public void testPraserForMissingStyleIdentifier() throws Exception { 261 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 262 WMTSTileSource testSource = new WMTSTileSource(testMissingStyleIdentifer); 263 testSource.initProjection(Main.getProjection()); 264 } 265 245 266 private void verifyTile(LatLon expected, WMTSTileSource source, int x, int y, int z) { 246 267 LatLon ll = new LatLon(source.tileXYToLatLon(x, y, z));
Note:
See TracChangeset
for help on using the changeset viewer.