[Mapbender-commits] r8294 - branches/2.7/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 27 09:08:44 EDT 2012


Author: verenadiewald
Date: 2012-03-27 06:08:44 -0700 (Tue, 27 Mar 2012)
New Revision: 8294

Modified:
   branches/2.7/http/classes/class_gml2.php
Log:
trim for $coordsDom->nodeValue for valid geoJSON

Modified: branches/2.7/http/classes/class_gml2.php
===================================================================
--- branches/2.7/http/classes/class_gml2.php	2012-03-27 13:07:41 UTC (rev 8293)
+++ branches/2.7/http/classes/class_gml2.php	2012-03-27 13:08:44 UTC (rev 8294)
@@ -651,7 +651,7 @@
 		$currentSibling = $domNode->firstChild;
 		while ($currentSibling) {
 			
-			foreach(explode(' ',$currentSibling->nodeValue) as $cords){
+			foreach(explode(' ',trim($currentSibling->nodeValue)) as $cords){
 				list($x,$y,$z) = explode(',',$cords);
 				$this->addPoint($x, $y);
 			}
@@ -743,7 +743,7 @@
 //			$value = $coordsDom->nodeValue;				
 //			echo "===> name: ".$name. ", Value: ".$value."<br>";
 			
-			foreach(explode(' ',$coordsDom->nodeValue) as $pointCoords){
+			foreach(explode(' ',trim($coordsDom->nodeValue)) as $pointCoords){
 
 				list($x,$y,$z) = explode(',',$pointCoords);
 				$this->addPoint($x, $y);
@@ -760,7 +760,7 @@
 				foreach ($coordinates as $coordinate) {
 					$coordsDom = dom_import_simplexml($coordinate);
 						
-					foreach(explode(' ',$coordsDom->nodeValue) as $pointCoords){
+					foreach(explode(' ',trim($coordsDom->nodeValue)) as $pointCoords){
 		
 						list($x,$y,$z) = explode(',',$pointCoords);
 						$this->addPointToRing($ringCount, $x, $y);



More information about the Mapbender_commits mailing list