[Mapbender-commits] r4379 - branches/2.6/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 16 11:18:56 EDT 2009


Author: christoph
Date: 2009-07-16 11:18:56 -0400 (Thu, 16 Jul 2009)
New Revision: 4379

Modified:
   branches/2.6/http/classes/class_wfs.php
Log:
add correct filter and namespaces

Modified: branches/2.6/http/classes/class_wfs.php
===================================================================
--- branches/2.6/http/classes/class_wfs.php	2009-07-16 15:18:16 UTC (rev 4378)
+++ branches/2.6/http/classes/class_wfs.php	2009-07-16 15:18:56 UTC (rev 4379)
@@ -75,14 +75,20 @@
 				$this->getVersion() . "&typename=" . $featureTypeName . 
 				"&filter=" . urlencode($filter);
 
+		// this code is for compatibility with the old Mapbender client side
+//		if (strpos($featureTypeName, ":") !== -1) {
+//			preg_replace("/<ogc:PropertyName>([a-zA-Z_]+:)([a-zA-Z_]+)</ogc:PropertyName>/");
+//		}
+
 		return $this->get($url);
 	}
 	
 	protected function getFeaturePost ($featureTypeName, $filter) {
 		$postData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . 
 			"<wfs:GetFeature version=\"" . $this->getVersion() . "\" " . 
-			"xmlns:ogc=\"http://www.opengis.net/ogc\" " . 
-			"xmlns:wfs=\"http://www.opengis.net/wfs\">" . 
+			"xmlns:wfs=\"http://www.opengis.net/wfs\" " . 
+			"xmlns:gml=\"http://www.opengis.net/gml\" " . 
+			"xmlns:ogc=\"http://www.opengis.net/ogc\">" . 
 			"<wfs:Query ";
 			
 		// add namespace
@@ -93,9 +99,9 @@
 			$postData .= "xmlns:" . $ns . "=\"" . $url . "\" ";
 			
 		}
-		$postData .= "typeName=\"" . $featureTypeName . "\"/>" . 
+		$postData .= "typeName=\"" . $featureTypeName . "\">" . 
 			$filter . 
-			"</wfs:GetFeature>";		
+			"</wfs:Query></wfs:GetFeature>";		
 
 		return $this->post($this->getFeature, $postData);
 	}



More information about the Mapbender_commits mailing list