[Dive4elements-commits] [PATCH] WMSLayer now use correct OnlineResource for map requests (e.g. Omniscale OSM Service is now working), see Issue #554

Wald Commits scm-commit at wald.intevation.org
Thu Jun 6 16:56:11 CEST 2013


# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1370530568 -7200
# Node ID 97339d3955d73dd2652ce13f34f0240949607c64
# Parent  f03f15032e6e52eb4c0e1777449bc5da393a813c
WMSLayer now use correct OnlineResource for map requests (e.g. Omniscale OSM Service is now working), see Issue #554.

diff -r f03f15032e6e -r 97339d3955d7 gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java
--- 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)


More information about the Dive4elements-commits mailing list