Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java @ 6221:97339d3955d7
WMSLayer now use correct OnlineResource for map requests (e.g. Omniscale OSM Service is now working), see Issue #554.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 06 Jun 2013 16:56:08 +0200 |
parents | 734ba3732bb6 |
children | 74a437805e2a |
comparison
equal
deleted
inserted
replaced
6220:f03f15032e6e | 6221:97339d3955d7 |
---|---|
97 "Capability/Layer"; | 97 "Capability/Layer"; |
98 | 98 |
99 public static final String XPATH_MAP_FORMAT = | 99 public static final String XPATH_MAP_FORMAT = |
100 "Capability/Request/GetMap/Format"; | 100 "Capability/Request/GetMap/Format"; |
101 | 101 |
102 public static final String XPATH_GETMAP_ONLINERESOURCE = | |
103 "Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@href"; | |
104 | |
102 public static final Pattern SRS_PATTERN = Pattern.compile("(EPSG:\\d+)*"); | 105 public static final Pattern SRS_PATTERN = Pattern.compile("(EPSG:\\d+)*"); |
103 | 106 |
104 | 107 |
105 private CapabilitiesParser() { | 108 private CapabilitiesParser() { |
106 } | 109 } |
210 NodeList layerNodes = (NodeList) XMLUtils.xpath( | 213 NodeList layerNodes = (NodeList) XMLUtils.xpath( |
211 capabilities, | 214 capabilities, |
212 XPATH_LAYERS, | 215 XPATH_LAYERS, |
213 XPathConstants.NODESET); | 216 XPathConstants.NODESET); |
214 | 217 |
215 List<WMSLayer> layers = parseLayers(layerNodes, onlineResource); | 218 String getMapOnlineResource = (String) XMLUtils.xpath( |
219 capabilities, | |
220 XPATH_GETMAP_ONLINERESOURCE, | |
221 XPathConstants.STRING); | |
222 | |
223 List<WMSLayer> layers = parseLayers(layerNodes, getMapOnlineResource); | |
216 | 224 |
217 // Parse MIME types of supported return types, e.g. image/jpeg | 225 // Parse MIME types of supported return types, e.g. image/jpeg |
218 NodeList mapFormatNodes = (NodeList) | 226 NodeList mapFormatNodes = (NodeList) |
219 XMLUtils.xpath(capabilities, XPATH_MAP_FORMAT, XPathConstants.NODESET); | 227 XMLUtils.xpath(capabilities, XPATH_MAP_FORMAT, XPathConstants.NODESET); |
220 List<String> mapFormats = new ArrayList<String>(); | 228 List<String> mapFormats = new ArrayList<String>(); |