[Mapbender-commits] r10357 - trunk/mapbender/http/extensions/mobilemap2/scripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Nov 27 08:13:05 PST 2019


Author: armin11
Date: 2019-11-27 08:13:04 -0800 (Wed, 27 Nov 2019)
New Revision: 10357

Modified:
   trunk/mapbender/http/extensions/mobilemap2/scripts/proxy.php
Log:
Test for uris - should be featureInfo requests!

Modified: trunk/mapbender/http/extensions/mobilemap2/scripts/proxy.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap2/scripts/proxy.php	2019-11-25 15:08:43 UTC (rev 10356)
+++ trunk/mapbender/http/extensions/mobilemap2/scripts/proxy.php	2019-11-27 16:13:04 UTC (rev 10357)
@@ -25,6 +25,31 @@
 
 // Make the call
 $response = curl_exec( $session );*/
+
+$getfeatureUrlObject = parse_url($query);
+
+$getFeatureInfoUrlQueryParams = explode('&', $getfeatureUrlObject['query']);
+
+
+$mandatoryGetFeatureInfoRequestParameters = array('VERSION','REQUEST','QUERY_LAYERS','X','Y','BBOX','WIDTH','HEIGHT');
+
+$numberOfMandatoryFields = 0;
+
+foreach ($getFeatureInfoUrlQueryParams as $getFeatureInfoUrlQueryParam) {
+    $qP = explode('=', $getFeatureInfoUrlQueryParam);
+    $qP = $qP[0];
+    if (in_array($qP, $mandatoryGetFeatureInfoRequestParameters)) {
+        $numberOfMandatoryFields++;
+    }
+}
+
+if ($numberOfMandatoryFields == 8) {
+    // is ok - most params are given
+} else {
+    echo "No accepted REQUEST!";
+    die();
+}
+
 $connector = new connector();
 $result = $connector->load($query);	
 //Datenausgabe



More information about the Mapbender_commits mailing list