svn commit: r381 - trunk/mapbender/http/classes/class_gml2.php

uli at osgeo.org uli at osgeo.org
Tue Jun 6 06:29:46 EDT 2006


Author: uli
Date: 2006-06-06 10:29:45+0000
New Revision: 381

Modified:
   trunk/mapbender/http/classes/class_gml2.php

Log:
two new functions to get x and y-coordinates separated


Modified: trunk/mapbender/http/classes/class_gml2.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/classes/class_gml2.php?view=diff&rev=381&p1=trunk/mapbender/http/classes/class_gml2.php&p2=trunk/mapbender/http/classes/class_gml2.php&r1=380&r2=381
==============================================================================
--- trunk/mapbender/http/classes/class_gml2.php	(original)
+++ trunk/mapbender/http/classes/class_gml2.php	2006-06-06 10:29:45+0000
@@ -118,6 +118,22 @@
 			}	
 		}
 	}
+	function getXfromMemberAsString($memberCount,$geomCount){
+		$t = explode(",",$this->geometry[$memberCount][$geomCount]);
+		$x = array();
+		for($i=0; $i<(count($t)-1); $i=$i+2){
+			array_push($x,$t[$i]);
+		}
+		return implode(",",$x);
+	}
+	function getYfromMemberAsString($memberCount,$geomCount){
+		$t = explode(",",$this->geometry[$memberCount][$geomCount]);
+		$y = array();
+		for($i=1; $i<=(count($t)-1); $i=$i+2){
+			array_push($y,$t[$i]);
+		}
+		return implode(",",$y);
+	}
 	function getGeometriesFromMember($memberCount){
 		return $this->geometry[$memberCount];	
 	}




More information about the Mapbender_commits mailing list