changeset 5793:4cc59122b682

Use fullRequestString as WMS Url
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 23 Apr 2013 15:32:22 +0200
parents 06036bc6fb19
children af2aa716152f
files flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Tue Apr 23 15:30:06 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Tue Apr 23 15:32:22 2013 +0200
@@ -263,6 +263,10 @@
         if (map != null) {
             GWT.log("Add new layer '" + layer.getName() + "' to map.");
             map.addLayer(layer);
+            if (layer instanceof WMS) {
+                wmsUrls.put(layer.getName(),
+                        ((WMS)layer).getFullRequestString(new WMSParams(), null));
+            }
         }
     }
 
@@ -454,7 +458,6 @@
         if (url == null || layers == null) {
             return null;
         }
-        this.wmsUrls.put(name, url);
 
         WMSParams params = new WMSParams();
         params.setLayers(layers);
@@ -473,7 +476,8 @@
         WMS wms = new WMS(layers, url, params, opts);
         wms.setIsVisible(at.getActive() == 1);
         wms.setIsBaseLayer(false);
-
+        // We can't set the full_url attribute here because map is not set
+        // at.addAttr("full_url", wms.getFullRequestString(params, null));
         return wms;
     }
 

http://dive4elements.wald.intevation.org