Mercurial > dive4elements > river
changeset 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 | f03f15032e6e |
children | 595f673f8a45 |
files | gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Thu Jun 06 16:43:37 2013 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Thu Jun 06 16:56:08 2013 +0200 @@ -99,6 +99,9 @@ public static final String XPATH_MAP_FORMAT = "Capability/Request/GetMap/Format"; + public static final String XPATH_GETMAP_ONLINERESOURCE = + "Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@href"; + public static final Pattern SRS_PATTERN = Pattern.compile("(EPSG:\\d+)*"); @@ -212,7 +215,12 @@ XPATH_LAYERS, XPathConstants.NODESET); - List<WMSLayer> layers = parseLayers(layerNodes, onlineResource); + String getMapOnlineResource = (String) XMLUtils.xpath( + capabilities, + XPATH_GETMAP_ONLINERESOURCE, + XPathConstants.STRING); + + List<WMSLayer> layers = parseLayers(layerNodes, getMapOnlineResource); // Parse MIME types of supported return types, e.g. image/jpeg NodeList mapFormatNodes = (NodeList)