From 987c2ae10238f55c949059315d998cfe18c79384 Mon Sep 17 00:00:00 2001 From: bartvde Date: Mon, 7 Mar 2011 01:26:56 +0000 Subject: [PATCH] Writing map via OWSContext discards nesting path, p=hbruch, r=me (closes #3064) git-svn-id: http://svn.openlayers.org/trunk/openlayers@11630 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/OWSContext/v0_3_1.js | 7 ++++--- tests/Format/OWSContext/v0_3_1.html | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Format/OWSContext/v0_3_1.js b/lib/OpenLayers/Format/OWSContext/v0_3_1.js index 4a795f86ed..35edba7de7 100644 --- a/lib/OpenLayers/Format/OWSContext/v0_3_1.js +++ b/lib/OpenLayers/Format/OWSContext/v0_3_1.js @@ -179,9 +179,10 @@ OpenLayers.Format.OWSContext.v0_3_1 = OpenLayers.Class(OpenLayers.Format.XML, { decomposeNestingPath: function(nPath){ var a = []; if (nPath instanceof Array) { - while (nPath.length > 0) { - a.push(nPath.slice()); - nPath.pop(); + var path = nPath.slice(); + while (path.length > 0) { + a.push(path.slice()); + path.pop(); } a.reverse(); } diff --git a/tests/Format/OWSContext/v0_3_1.html b/tests/Format/OWSContext/v0_3_1.html index 6f5b0bb1dc..9c7a879471 100644 --- a/tests/Format/OWSContext/v0_3_1.html +++ b/tests/Format/OWSContext/v0_3_1.html @@ -4,7 +4,7 @@