Changeset 4467 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-09-26T12:19:14+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java
r4466 r4467 307 307 if (!Pattern.compile(".*GetCapabilities.*", Pattern.CASE_INSENSITIVE).matcher(serviceUrlStr).matches()) { 308 308 // If the url doesn't already have GetCapabilities, add it in 309 getCapabilitiesUrl = new URL(serviceUrlStr + "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities"); 309 getCapabilitiesUrl = new URL(serviceUrlStr); 310 final String getCapabilitiesQuery = "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities"; 311 if (getCapabilitiesUrl.getQuery() == null) { 312 getCapabilitiesUrl = new URL(serviceUrlStr + "?" + getCapabilitiesQuery); 313 } else if (!getCapabilitiesUrl.getQuery().isEmpty() && !getCapabilitiesUrl.getQuery().endsWith("&")) { 314 getCapabilitiesUrl = new URL(serviceUrlStr + "&" + getCapabilitiesQuery); 315 } else { 316 getCapabilitiesUrl = new URL(serviceUrlStr + getCapabilitiesQuery); 317 } 310 318 } else { 311 319 // Otherwise assume it's a good URL and let the subsequent error
Note:
See TracChangeset
for help on using the changeset viewer.