[Mapbender-commits] r9137 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 5 03:18:23 PST 2015


Author: armin11
Date: 2015-01-05 03:18:23 -0800 (Mon, 05 Jan 2015)
New Revision: 9137

Modified:
   trunk/mapbender/http/classes/class_georss_geometry.php
Log:
Fix problem in ATOM feed client when getting coords in -.1233123 format - this is not a valid json number format ;-)

Modified: trunk/mapbender/http/classes/class_georss_geometry.php
===================================================================
--- trunk/mapbender/http/classes/class_georss_geometry.php	2015-01-05 09:36:51 UTC (rev 9136)
+++ trunk/mapbender/http/classes/class_georss_geometry.php	2015-01-05 11:18:23 UTC (rev 9137)
@@ -277,9 +277,9 @@
 			$coordArray = explode(' ',$betterPolygon);
 		}
 		$countCoordPairs = count($coordArray) / 2;
-		//in georss lat/lon is given, in geojson lon lat will be used http://www.georss.org/simple http://www.geojson.org/geojson-spec.html#coordinate-reference-system-objects
+		//Parse to double, cause -.2334 is not a valid json number ;-)
 		for ($j=0; $j<=($countCoordPairs-1); $j++) {
-			$this->addPoint($coordArray[$j*2 + 1], $coordArray[$j*2]);
+			$this->addPoint((string)(double)$coordArray[$j*2 + 1], (string)(double)$coordArray[$j*2]);
 		}
 	}
 }



More information about the Mapbender_commits mailing list