Changeset 13742 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2018-05-13T09:15:34+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/imagery
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r13733 r13742 290 290 if ("layer".equals(qName)) { 291 291 newState = State.NOOP; 292 defaultLayers.add(new DefaultLayer(entry.getImageryType(), atts.getValue("name"),atts.getValue("style"), atts.getValue("tileMatrixSet"))); 292 defaultLayers.add(new DefaultLayer( 293 entry.getImageryType(), 294 atts.getValue("name"), 295 atts.getValue("style"), 296 atts.getValue("tileMatrixSet") 297 )); 293 298 } 294 299 break; -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r13741 r13742 132 132 * Make getCapabilities request towards given URL 133 133 * @param url service url 134 * @throws IOException 135 * @throws WMSGetCapabilitiesException 134 * @throws IOException when connection error when fetching get capabilities document 135 * @throws WMSGetCapabilitiesException when there are errors when parsing get capabilities document 136 136 */ 137 137 public WMSImagery(String url) throws IOException, WMSGetCapabilitiesException { … … 143 143 * @param url service url 144 144 * @param headers HTTP headers to be sent with request 145 * @throws IOException 146 * @throws WMSGetCapabilitiesException 145 * @throws IOException when connection error when fetching get capabilities document 146 * @throws WMSGetCapabilitiesException when there are errors when parsing get capabilities document 147 147 */ 148 148 public WMSImagery(String url, Map<String, String> headers) throws IOException, WMSGetCapabilitiesException { … … 185 185 } catch (MalformedURLException e1) { // NOPMD 186 186 // do nothing, raise original exception 187 Logging.trace(e1); 187 188 } 188 189 } … … 287 288 288 289 /** 289 * @see #buildGetMapUrl(List, boolean)290 *291 290 * @param selectedLayers selected layers as subset of the tree returned by {@link #getLayers()} 292 291 * @param selectedStyles selected styles for all selectedLayers 293 292 * @param transparent whether returned images should contain transparent pixels (if supported by format) 294 293 * @return URL template for GetMap service 294 * @see #buildGetMapUrl(List, boolean) 295 295 */ 296 296 public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) { … … 303 303 304 304 /** 305 * @see #buildGetMapUrl(List, boolean)306 *307 305 * @param selectedLayers selected layers as list of strings 308 306 * @param selectedStyles selected styles of layers as list of strings … … 310 308 * @param transparent whether returned images should contain transparent pixels (if supported by format) 311 309 * @return URL template for GetMap service 310 * @see #buildGetMapUrl(List, boolean) 312 311 */ 313 312 public String buildGetMapUrl(List<String> selectedLayers, … … 385 384 if (GetCapabilitiesParseHelper.moveReaderToTag(reader, this::tagEquals, QN_TITLE)) { 386 385 this.title = reader.getElementText(); 386 // CHECKSTYLE.OFF: EmptyBlock 387 387 for (int event = reader.getEventType(); 388 388 reader.hasNext() && !(event == XMLStreamReader.END_ELEMENT && tagEquals(QN_SERVICE, reader.getName())); … … 390 390 // empty loop, just move reader to the end of Service tag, if moveReaderToTag return false, it's already done 391 391 } 392 // CHECKSTYLE.ON: EmptyBlock 392 393 } 393 394 } … … 591 592 } 592 593 593 594 594 private String normalizeUrl(String serviceUrlStr) throws MalformedURLException { 595 595 URL getCapabilitiesUrl = null; … … 641 641 } 642 642 643 644 643 static boolean imageFormatHasTransparency(final String format) { 645 644 return format != null && (format.startsWith("image/png") || format.startsWith("image/gif") … … 686 685 687 686 /** 688 * @param defaultLayers 687 * @param defaultLayers default layers that should select layer object 689 688 * @return collection of LayerDetails specified by DefaultLayers 690 689 */
Note:
See TracChangeset
for help on using the changeset viewer.