[Mapbender-commits] r1141 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Feb 23 07:06:00 EST 2007
Author: christoph
Date: 2007-02-23 07:06:00 -0500 (Fri, 23 Feb 2007)
New Revision: 1141
Modified:
trunk/mapbender/http/php/mod_wfs_result.php
Log:
removed obsolete function
Modified: trunk/mapbender/http/php/mod_wfs_result.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_result.php 2007-02-23 11:58:17 UTC (rev 1140)
+++ trunk/mapbender/http/php/mod_wfs_result.php 2007-02-23 12:06:00 UTC (rev 1141)
@@ -34,53 +34,6 @@
}
}
-function addParameterToFilter($filter) {
- $doc = new DOMDocument('1.0');
- $doc->encoding = CHARSET;
- $doc->preserveWhiteSpace = false;
- $doc->loadXML($filter);
- return $doc->saveXML();
-
- $andNode = $doc->createElement('And');
-
- // get all 'within' nodes
- $nodeListWithin = $doc->getElementsByTagName('Within');
- for ($i=0 ; $i < $nodeListWithin->length ; $i++) {
- $currentNode = $doc->removeChild($nodeListWithin->item($i));
- $andNode->appendChild($currentNode);
- }
-
- // get all 'ogc:BBOX' nodes
- $nodeListBox = $doc->getElementsByTagNameNS('http://ogc.org', 'BBOX');
- for ($i=0 ; $i < $nodeListBox->length ; $i++) {
- $currentNode = $doc->removeChild($nodeListBox->item($i));
- $andNode->appendChild($currentNode);
- }
-
- // generate 'propertyIsLike' Node
- $propertyIsLikeNode = $doc->createElementNS('http://ogc.org', 'PropertyIsLike');
- $propertyIsLikeNode->setAttribute('wildCard', '*');
- $propertyIsLikeNode->setAttribute('singleChar', '.');
- $propertyIsLikeNode->setAttribute('escape', '!');
-
- $propertyNameNode = $doc->createElementNS('http://ogc.org', 'PropertyName', 'ud_id');
- $propertyIsLikeNode->appendChild($propertyNameNode);
-
- $literalNode = $doc->createElementNS('http://ogc.org', 'Literal', '*'.$_SESSION['AstUdNr']);
- $propertyIsLikeNode->appendChild($literalNode);
-
- $andNode->appendChild($propertyIsLikeNode);
-
- // add 'And' node to XML
- $nodeListFilter = $doc->getElementsByTagNameNS('http://ogc.org', 'Filter');
- for ($i=0 ; $i < $nodeListFilter->length ; $i++) {
- $currentNode = $nodeListFilter->item($i);
- $currentNode->appendChild($andNode);
- }
- return $doc->saveXML();
-}
-
-//echo addParameterToFilter($filter);die();
$wfsRequest = $url . urlencode($filter);
$connection = new connector($wfsRequest);
$data = $connection->file;
@@ -151,6 +104,7 @@
else {
$geom_str .= "alert('unknown geomtype ".sepNameSpace($element[tag])."');";
}
+ // TO DO: the following is added twice! Once suffices.
$element_str .= "geom.get(" . $member . ").e.setElement('fid', '".$fid."');\n";
$element_str .= "geom.get(" . $member . ").wfs_conf = ".$_REQUEST['wfs_conf_id'].";\n";
}
More information about the Mapbender_commits
mailing list