[Mapbender-commits] r5255 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 4 05:22:06 EST 2010


Author: christoph
Date: 2010-01-04 05:22:06 -0500 (Mon, 04 Jan 2010)
New Revision: 5255

Modified:
   trunk/mapbender/http/javascripts/map_obj.js
   trunk/mapbender/http/javascripts/wms.js
Log:
http://trac.osgeo.org/mapbender/ticket/561

Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js	2010-01-04 10:19:04 UTC (rev 5254)
+++ trunk/mapbender/http/javascripts/map_obj.js	2010-01-04 10:22:06 UTC (rev 5255)
@@ -736,10 +736,11 @@
         if (validLayers.length === 0) {
             return false;
         }
+		var validLayersEncoded = [];
         for (var i = 0; i < validLayers.length; i++) {
-            validLayers[i] = encodeURIComponent(validLayers[i]);
+            validLayersEncoded[i] = encodeURIComponent(validLayers[i]);
         }
-        var layerNames = validLayers.join(",");
+        var layerNames = validLayersEncoded.join(",");
         
         url = currentWms.wms_getmap;
         url += mb_getConjunctionCharacter(currentWms.wms_getmap);
@@ -753,15 +754,14 @@
         
         url += "LAYERS=" + layerNames + "&";
         url += "STYLES=";
-        var layer = layerNames.split(",");
-        for (var j = 0; j < layer.length; j++) {
+        for (var j = 0; j < validLayers.length; j++) {
             if (j > 0) {
                 url += ",";
             }
             
-            if (currentWms.getCurrentStyleByLayerName(layer[j]) !== false &&
-            typeof currentWms.getCurrentStyleByLayerName(layer[j]) !== "undefined") {
-                url += currentWms.getCurrentStyleByLayerName(layer[j]);
+            if (currentWms.getCurrentStyleByLayerName(validLayers[j]) !== false &&
+            typeof currentWms.getCurrentStyleByLayerName(validLayers[j]) !== "undefined") {
+                url += currentWms.getCurrentStyleByLayerName(validLayers[j]);
             }
         }
         url += "&";

Modified: trunk/mapbender/http/javascripts/wms.js
===================================================================
--- trunk/mapbender/http/javascripts/wms.js	2010-01-04 10:19:04 UTC (rev 5254)
+++ trunk/mapbender/http/javascripts/wms.js	2010-01-04 10:22:06 UTC (rev 5255)
@@ -427,6 +427,7 @@
 			}
 		}
 	}
+	return false;
 };
 
 /**



More information about the Mapbender_commits mailing list