[Mapbender-commits] r9912 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jun 14 00:35:22 PDT 2018
Author: armin11
Date: 2018-06-14 00:35:22 -0700 (Thu, 14 Jun 2018)
New Revision: 9912
Modified:
trunk/mapbender/http/php/mod_inspireDownloadFeed.php
Log:
Fix for getfeature links of inspire atom feeds with wfs > 2.0.0 - use typeNames instead of typeName - see wfs spec
Modified: trunk/mapbender/http/php/mod_inspireDownloadFeed.php
===================================================================
--- trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2018-06-06 08:49:54 UTC (rev 9911)
+++ trunk/mapbender/http/php/mod_inspireDownloadFeed.php 2018-06-14 07:35:22 UTC (rev 9912)
@@ -1193,7 +1193,17 @@
//define request to get number of hits per featuretype
//add ? if not given in string
$gHLink = $mapbenderMetadata[$i]->wfs_getfeature."SERVICE=WFS&REQUEST=GetFeature&VERSION=";
- $gHLink .= $mapbenderMetadata[$i]->wfs_version."&typeName=";
+ switch ($mapbenderMetadata[$i]->wfs_version) {
+ case "2.0.0":
+ $gHLink .= $mapbenderMetadata[$i]->wfs_version."&typeNames=";
+ break;
+ case "2.0.2":
+ $gHLink .= $mapbenderMetadata[$i]->wfs_version."&typeNames=";
+ break;
+ default:
+ $gHLink .= $mapbenderMetadata[$i]->wfs_version."&typeName=";
+ break;
+ }
$gHLink .= $mapbenderMetadata[$i]->featuretype_name."&resultType=hits";
$startRequestTime = time();
//get auth information from database:
@@ -1416,7 +1426,17 @@
$wfsGetFeatureUrl = $mapbenderServerUrl."/registry/wfs/".$mapbenderMetadata[$i]->wfs_id."?";
}
$gFLink = $wfsGetFeatureUrl."SERVICE=WFS&REQUEST=GetFeature&VERSION=";
- $gFLink .= $mapbenderMetadata[$i]->wfs_version."&typeName=".$mapbenderMetadata[$i]->featuretype_name;
+ switch ($mapbenderMetadata[$i]->wfs_version) {
+ case "2.0.0":
+ $gFLink .= $mapbenderMetadata[$i]->wfs_version."&typeNames=".$mapbenderMetadata[$i]->featuretype_name;
+ break;
+ case "2.0.2":
+ $gFLink .= $mapbenderMetadata[$i]->wfs_version."&typeNames=".$mapbenderMetadata[$i]->featuretype_name;
+ break;
+ default:
+ $gFLink .= $mapbenderMetadata[$i]->wfs_version."&typeName=".$mapbenderMetadata[$i]->featuretype_name;
+ break;
+ }
$gFLink .= "&srsName=".$mapbenderMetadata[$i]->featuretype_srs;
//TODO check if other epsg string should be used!
//$crsObject->identifier;
More information about the Mapbender_commits
mailing list