[Mapbender-commits] r7136 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Nov 16 07:36:59 EST 2010
Author: christoph
Date: 2010-11-16 04:36:59 -0800 (Tue, 16 Nov 2010)
New Revision: 7136
Modified:
trunk/mapbender/http/classes/class_wfs_1_1_factory.php
Log:
#721
Modified: trunk/mapbender/http/classes/class_wfs_1_1_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2010-11-16 10:50:55 UTC (rev 7135)
+++ trunk/mapbender/http/classes/class_wfs_1_1_factory.php 2010-11-16 12:36:59 UTC (rev 7136)
@@ -46,7 +46,28 @@
$xml = $this->post($aWfs->describeFeatureType, $postData);
return $this->createFeatureTypeFromXml ($xml, $aWfs);
}
-
+ protected function createFeatureTypeFromUrlGet ($aWfs, $featureTypeName, $featureTypeNsArray) {
+
+ $key = $this->getNameSpace($featureTypeName);
+
+ $paramArray = array(
+ "SERVICE=WFS",
+ "VERSION=1.1.0",
+ "REQUEST=DescribeFeatureType",
+ "TYPENAME=" . urlencode($featureTypeName),
+ "NAMESPACE=" . urlencode(
+ "xmlns(" . $key . "=" . $featureTypeNsArray[$key] . ")"
+ )
+ );
+
+ $url = $aWfs->describeFeatureType .
+ $aWfs->getConjunctionCharacter($aWfs->describeFeatureType) .
+ implode("&", $paramArray);
+
+ $xml = $this->get($url);
+ return $this->createFeatureTypeFromXml ($xml, $aWfs);
+ }
+
protected function createFeatureTypeFromXml ($xml, $myWfs) {
$newFeatureType = new WfsFeatureType($myWfs);
@@ -147,7 +168,12 @@
}
# descriptFeatureType
- if($section == "describefeaturetype" && $tag == "POST"){
+# if($section == "describefeaturetype" && $tag == "POST"){
+# $myWfs->describeFeatureType = html_entity_decode($element[attributes]["xlink:href"]);
+# }
+
+ # descriptFeatureType
+ if($section == "describefeaturetype" && $tag == "GET"){
$myWfs->describeFeatureType = html_entity_decode($element[attributes]["xlink:href"]);
}
@@ -192,6 +218,10 @@
}
}
}
+ // is a NOT NULL column!
+ if (!$myWfs->title) {
+ $myWfs->title = "Untitled";
+ }
return $myWfs;
}
catch (Exception $e) {
More information about the Mapbender_commits
mailing list