Changeset 15228 in josm for trunk/src/org
- Timestamp:
- 2019-07-07T22:13:12+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r15209 r15228 185 185 if (wms != null && wms.buildRootUrl() != null) { 186 186 // TODO: ask user about transparency 187 info = wms.toImageryInfo(getImageryName(), tree.getSelectedLayers(), (List<String>) null, true); 187 info = wms.toImageryInfo( 188 getImageryName(), tree.getSelectedLayers(), (List<String>) null, (String) formats.getSelectedItem(), true); 188 189 } else { 189 190 info = new ImageryInfo(getImageryName(), getWmsUrl()); -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r15209 r15228 311 311 */ 312 312 public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) { 313 return buildGetMapUrl(selectedLayers, selectedStyles, getPreferredFormat(), transparent); 314 } 315 316 /** 317 * @param selectedLayers selected layers as subset of the tree returned by {@link #getLayers()} 318 * @param selectedStyles selected styles for all selectedLayers 319 * @param format format of the response - one of {@link #getFormats()} 320 * @param transparent whether returned images should contain transparent pixels (if supported by format) 321 * @return URL template for GetMap service 322 * @see #buildGetMapUrl(List, boolean) 323 * @since 15228 324 */ 325 public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, String format, boolean transparent) { 313 326 return buildGetMapUrl( 314 327 selectedLayers.stream().map(LayerDetails::getName).collect(Collectors.toList()), 315 328 selectedStyles, 316 getPreferredFormat(),329 format, 317 330 transparent); 318 331 } … … 662 675 * @param selectedLayers layers which are to be used by this imagery layer 663 676 * @param selectedStyles styles that should be used for selectedLayers 677 * @param format format of the response - one of {@link #getFormats()} 664 678 * @param transparent if layer should be transparent 665 679 * @return ImageryInfo object 666 */ 667 public ImageryInfo toImageryInfo(String name, List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) { 668 ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers, selectedStyles, transparent)); 680 * @since 15228 681 */ 682 public ImageryInfo toImageryInfo( 683 String name, List<LayerDetails> selectedLayers, List<String> selectedStyles, String format, boolean transparent) { 684 ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers, selectedStyles, format, transparent)); 669 685 if (selectedLayers != null && !selectedLayers.isEmpty()) { 670 686 i.setServerProjections(getServerProjections(selectedLayers));
Note:
See TracChangeset
for help on using the changeset viewer.