- Timestamp:
- 2018-05-30T19:04:15+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r13839 r13872 167 167 try { 168 168 CheckParameterUtil.ensureThat(ImageryType.WMS_ENDPOINT.equals(info.getImageryType()), "wms_endpoint imagery type expected"); 169 final WMSImagery wms = new WMSImagery(info.getUrl() );169 final WMSImagery wms = new WMSImagery(info.getUrl(), info.getCustomHttpHeaders()); 170 170 171 171 final WMSLayerTree tree = new WMSLayerTree(); … … 201 201 .map(LayerDetails::getName) 202 202 .collect(Collectors.joining(", ")); 203 ImageryInfo ret = new ImageryInfo(info.getName() + selectedLayers, 204 url, 205 "wms", 206 info.getEulaAcceptanceRequired(), 207 info.getCookies()); 208 203 // Use full copy of original Imagery info to copy all attributes. Only overwrite what's different 204 ImageryInfo ret = new ImageryInfo(info); 205 ret.setUrl(url); 206 ret.setImageryType(ImageryType.WMS); 207 ret.setName(info.getName() + selectedLayers); 209 208 ret.setServerProjections(wms.getServerProjections(tree.getSelectedLayers())); 210 211 209 return ret; 212 210 } catch (MalformedURLException ex) { -
trunk/src/org/openstreetmap/josm/data/imagery/WMSEndpointTileSource.java
r13829 r13872 43 43 CheckParameterUtil.ensure(info, "imageryType", x -> ImageryType.WMS_ENDPOINT.equals(x.getImageryType())); 44 44 try { 45 wmsi = new WMSImagery(info.getUrl() );45 wmsi = new WMSImagery(info.getUrl(), info.getCustomHttpHeaders()); 46 46 } catch (IOException | WMSGetCapabilitiesException e) { 47 47 throw new IllegalArgumentException(e); -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r13829 r13872 432 432 // TODO should we handle also POST? 433 433 if ("GET".equalsIgnoreCase(mode) && getMapUrl != null && !"".equals(getMapUrl)) { 434 this.getMapUrl = getMapUrl; 434 if (getMapUrl.endsWith("?")) { 435 this.getMapUrl = getMapUrl; 436 } else { 437 this.getMapUrl = getMapUrl + "?"; 438 } 435 439 } 436 440 }
Note:
See TracChangeset
for help on using the changeset viewer.