[Mapbender-commits] r1996 - branches/2.5/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 21 03:32:34 EST 2008


Author: christoph
Date: 2008-01-21 03:32:34 -0500 (Mon, 21 Jan 2008)
New Revision: 1996

Modified:
   branches/2.5/http/classes/class_kml_ows.php
Log:
removed debug code (print_r)

added function getId()

bug fix in toGeoJSON (blank instead of comma)

Modified: branches/2.5/http/classes/class_kml_ows.php
===================================================================
--- branches/2.5/http/classes/class_kml_ows.php	2008-01-21 08:30:50 UTC (rev 1995)
+++ branches/2.5/http/classes/class_kml_ows.php	2008-01-21 08:32:34 UTC (rev 1996)
@@ -108,9 +108,9 @@
 						$coordinates = "";
 						for ($j = 0; $j < count($coordinatesArray); $j++) {
 							if ($j > 0) {
-								$coordinates .= ",";
+								$coordinates .= " ";
 							}
-							$coordinates .= $coordinatesArray[$j]["x"] . "," . $coordinatesArray[$j]["y"];
+							$coordinates .= $coordinatesArray[$j]["x"] . "," . $coordinatesArray[$j]["y"] . ",0";
 							
 						}
 						$e_coordinates = $doc->createElement("coordinates", $coordinates);
@@ -134,6 +134,12 @@
 		return $this->kml;
 	}
 	
+	/**
+	 * @return string the ID of this KML.
+	 */
+	public function getId () {
+		return $this->id;
+	}
 	
 	/**
 	 * parses an incoming KML, creates the object, 
@@ -175,7 +181,7 @@
 		$e = new mb_notice("parsing finished...#placemarks: " . count($this->placemarkArray) . " (" . count($parser->placemarkArray) . ")");
 		$this->placemarkArray = $parser->placemarkArray; 
 
-		print_r($this);
+//		print_r($this);
 		
 //		$this->kml = $this->__toString();
 



More information about the Mapbender_commits mailing list