Changeset 7175 in josm for trunk/src/org
- Timestamp:
- 2014-05-24T14:04:15+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r7033 r7175 104 104 public String buildGetMapUrl(Collection<LayerDetails> selectedLayers, String format) { 105 105 return buildRootUrl() 106 + "FORMAT=" + format + "&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=" 106 + "FORMAT=" + format + (imageFormatHasTransparency(format) ? "&TRANSPARENT=TRUE" : "") 107 + "&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=" 107 108 + Utils.join(",", Utils.transform(selectedLayers, new Utils.Function<LayerDetails, String>() { 108 109 @Override … … 153 154 } 154 155 String incomingData = ba.toString(); 156 Main.debug("Server response to Capabilities request:"); 157 Main.debug(incomingData); 155 158 156 159 try { … … 221 224 || format.startsWith("image/bmp") && ImageIO.getImageReadersBySuffix("bmp").hasNext(); 222 225 } 226 227 static boolean imageFormatHasTransparency(final String format) { 228 return format.startsWith("image/png") || format.startsWith("image/gif") 229 || format.startsWith("image/svg") || format.startsWith("image/tiff"); 230 } 223 231 224 232 public ImageryInfo toImageryInfo(String name, Collection<LayerDetails> selectedLayers) {
Note:
See TracChangeset
for help on using the changeset viewer.