Parcourir la source

added support for featureID arg in GetFeature QGIS api

Piotr Labudda il y a 9 ans
Parent
commit
c846e72899
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      SE/se-lib/Api/WfsQgisServer.php

+ 3 - 1
SE/se-lib/Api/WfsQgisServer.php

@@ -77,6 +77,7 @@ class Api_WfsQgisServer extends Api_WfsServerBase {
 		$searchParams['order_by'] = $acl->getPrimaryKeyField();
 		$searchParams['order_dir'] = 'DESC';
 		if (!empty($args['bbox'])) $searchParams['f_the_geom'] = "BBOX:{$args['bbox']}";
+		if (!empty($args['primaryKey'])) $searchParams['primaryKey'] = $args['primaryKey'];
 		//if ($geomFld) $searchParams["f_{$geomFld}"] = 'IS NOT NULL';
 		//if ($geomFld) $searchParams["f_{$geomFld}"] = 'GeometryType=' . strtoupper($dbGeomType);
 		$geomType = strtoupper($dbGeomType);
@@ -97,7 +98,8 @@ class Api_WfsQgisServer extends Api_WfsServerBase {
 	</ogc:And>
 </ogc:Filter>
 OGC_FILTER;
-if($DBG){echo 'getItems:';print_r($searchParams);echo "\n";}
+if($DBG){echo 'args:';print_r($args);echo "\n";}
+if($DBG){echo 'getItems(params) \$params:';print_r($searchParams);echo "\n";}
 		$this->DBG("getItems:" . json_encode($searchParams), __LINE__, __FUNCTION__, __CLASS__);
 		$items = $acl->getItems($searchParams);
 		$this->DBG("items(" . count($items) . ")", __LINE__, __FUNCTION__, __CLASS__);