Changeset 12475 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-07-13T22:14:20+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r12469 r12475 173 173 } 174 174 175 /** 176 * Returns the URL for the "GetMap" WMS request in JPEG format. 177 * @param selectedLayers the list of selected layers, matching the "LAYERS" WMS request argument 178 * @return the URL for the "GetMap" WMS request 179 */ 175 180 public String buildGetMapUrl(Collection<LayerDetails> selectedLayers) { 176 181 return buildGetMapUrl(selectedLayers, "image/jpeg"); 177 182 } 178 183 184 /** 185 * Returns the URL for the "GetMap" WMS request. 186 * @param selectedLayers the list of selected layers, matching the "LAYERS" WMS request argument 187 * @param format the requested image format, matching the "FORMAT" WMS request argument 188 * @return the URL for the "GetMap" WMS request 189 */ 179 190 public String buildGetMapUrl(Collection<LayerDetails> selectedLayers, String format) { 180 191 return buildRootUrl() + "FORMAT=" + format + (imageFormatHasTransparency(format) ? "&TRANSPARENT=TRUE" : "") … … 184 195 } 185 196 197 /** 198 * Attempts WMS "GetCapabilities" request and initializes internal variables if successful. 199 * @param serviceUrlStr WMS service URL 200 * @throws IOException if any I/O errors occurs 201 * @throws WMSGetCapabilitiesException if the WMS server replies a ServiceException 202 */ 186 203 public void attemptGetCapabilities(String serviceUrlStr) throws IOException, WMSGetCapabilitiesException { 187 204 URL getCapabilitiesUrl = null; … … 288 305 } 289 306 307 /** 308 * Returns a new {@code ImageryInfo} describing the given service name and selected WMS layers. 309 * @param name service name 310 * @param selectedLayers selected WMS layers 311 * @return a new {@code ImageryInfo} describing the given service name and selected WMS layers 312 */ 290 313 public ImageryInfo toImageryInfo(String name, Collection<LayerDetails> selectedLayers) { 291 314 ImageryInfo i = new ImageryInfo(name, buildGetMapUrl(selectedLayers)); … … 345 368 bboxElem = getChild(element, "LatLonBoundingBox"); 346 369 if (bboxElem != null) { 347 double left = getDecimalDegree(bboxElem ,"minx");370 double left = getDecimalDegree(bboxElem, "minx"); 348 371 double top = getDecimalDegree(bboxElem, "maxy"); 349 372 double right = getDecimalDegree(bboxElem, "maxx");
Note:
See TracChangeset
for help on using the changeset viewer.