[Mapbender-commits] r9136 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 5 01:36:52 PST 2015
Author: armin11
Date: 2015-01-05 01:36:51 -0800 (Mon, 05 Jan 2015)
New Revision: 9136
Modified:
trunk/mapbender/http/classes/class_georss_geometry.php
Log:
Fix problem when more than one whitespace separates polygon entries - like this is so in spanish and polish inspire atom feeds.
Modified: trunk/mapbender/http/classes/class_georss_geometry.php
===================================================================
--- trunk/mapbender/http/classes/class_georss_geometry.php 2014-12-18 16:17:45 UTC (rev 9135)
+++ trunk/mapbender/http/classes/class_georss_geometry.php 2015-01-05 09:36:51 UTC (rev 9136)
@@ -268,10 +268,13 @@
public function parsePolygon ($georssPolygon) {
if (gettype($georssPolygon) == 'object') {
//polygon is given as dom node
- $coordArray = explode(' ',$georssPolygon->nodeValue);
+ //problem when more than one whitespace are in the polygon string
+ $betterPolygon = preg_replace('/\s+/', ' ',$georssPolygon->nodeValue);
+ $coordArray = explode(' ',$betterPolygon);
} else {
//polygon is given as string
- $coordArray = explode(' ',$georssPolygon);
+ $betterPolygon = preg_replace('/\s+/', ' ',$georssPolygon);
+ $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
More information about the Mapbender_commits
mailing list