[Mapbender-commits] r9585 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 8 00:28:04 PDT 2016
Author: armin11
Date: 2016-09-08 00:28:04 -0700 (Thu, 08 Sep 2016)
New Revision: 9585
Modified:
trunk/mapbender/http/classes/class_wmcToXml.php
Log:
Bugfix for xml encoding mapobject as wmc with multiple dimensions
Modified: trunk/mapbender/http/classes/class_wmcToXml.php
===================================================================
--- trunk/mapbender/http/classes/class_wmcToXml.php 2016-09-08 05:55:19 UTC (rev 9584)
+++ trunk/mapbender/http/classes/class_wmcToXml.php 2016-09-08 07:28:04 UTC (rev 9585)
@@ -392,16 +392,13 @@
//$e = new mb_exception("class_wmcToXml.php: try to get dimension for layer from currentLayer");
//
if (count($currentLayer->layer_dimension) >= 1) {
- //
//$e = new mb_exception("class_wmcToXml.php: somedimension found");
$e_layer_dimensionlist = $this->doc->createElement("DimensionList");
- for ($k = 0; $k < count($currentLayer->layer_dimension); $k++){
+ foreach($currentLayer->layer_dimension as $dimension) {
$e_layer_dimension = $this->doc->createElement("Dimension");
- foreach($currentLayer->layer_dimension as $dimension) {
- foreach(get_object_vars($dimension) as $key=>$value) {
- $e_layer_dimension->setAttribute($key, $value);
- }
- }
+ foreach(get_object_vars($dimension) as $key=>$value) {
+ $e_layer_dimension->setAttribute($key, $value);
+ }
$e_layer_dimensionlist->appendChild($e_layer_dimension);
}
return $e_layer_dimensionlist;
More information about the Mapbender_commits
mailing list