[Mapbender-commits] r10197 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 6 07:36:27 PDT 2019


Author: armin11
Date: 2019-08-06 07:36:27 -0700 (Tue, 06 Aug 2019)
New Revision: 10197

Modified:
   trunk/mapbender/http/php/mod_linkedDataProxy.php
Log:
Some more limit options for wfs 3.0 proxy

Modified: trunk/mapbender/http/php/mod_linkedDataProxy.php
===================================================================
--- trunk/mapbender/http/php/mod_linkedDataProxy.php	2019-08-06 11:46:15 UTC (rev 10196)
+++ trunk/mapbender/http/php/mod_linkedDataProxy.php	2019-08-06 14:36:27 UTC (rev 10197)
@@ -8,7 +8,7 @@
 //initialize some parameter
 $limit = 10;
 //objects per page
-$maxObjectsPerPage = 10;
+//$maxObjectsPerPage = 10;
 //default page
 $page = 0;
 //default format f
@@ -29,7 +29,7 @@
 $maxyFC = 9;
 //	
 $newline = "\n";
-$allowedLimits = array("1","5","10","20");
+$allowedLimits = array("1","5","10","20","50","100");
 function microtime_float() {
     	list($usec, $sec) = explode(" ", microtime());
     	return ((float)$usec + (float)$sec);
@@ -422,7 +422,7 @@
 			    }	
 		            die();
 		        } else {
-		            $startIndex = $page * $maxObjectsPerPage;
+		            $startIndex = $page * $limit;
 		        }
 			if (!isset($offset)) {
 			    $offset = 0;
@@ -444,7 +444,7 @@
 			//check if outputformat geojson is available - if - gml don't need to be parsed!!!!! TODO - where to become hits ????? - has to count in a special request!!!!!
 			if (in_array('application/json; subtype=geojson', explode(',', $ftOutputFormats)) && $nativeJson == true) {
 			//if (false) {
-			    $features = $wfs->getFeaturePaging($ftName, $filter, "EPSG:4326", null, null, $maxObjectsPerPage, $startIndex, "2.0.0", 'application/json; subtype=geojson');
+			    $features = $wfs->getFeaturePaging($ftName, $filter, "EPSG:4326", null, null, $limit, $startIndex, "2.0.0", 'application/json; subtype=geojson');
 			    $geojsonList = json_decode($features);
 			    $geojsonBbox = array();
 			    $geojsonIndex = 0;
@@ -545,7 +545,7 @@
 			    echo $features;
 			    die();*/
 			} else {
-			    $features = $wfs->getFeaturePaging($ftName, $filter, "EPSG:4326", null, null, $maxObjectsPerPage, $startIndex, "2.0.0");
+			    $features = $wfs->getFeaturePaging($ftName, $filter, "EPSG:4326", null, null, $limit, $startIndex, "2.0.0");
 			    //transform to geojson to allow rendering !
 			    $gml3Class = new Gml_3_Factory();
 			    //create featuretype object



More information about the Mapbender_commits mailing list