|
@@ -47,7 +47,7 @@ class GeoJsonService
|
47
|
47
|
return $geometryColumnName;
|
48
|
48
|
}
|
49
|
49
|
|
50
|
|
- private function setBoudingBoxFilter(array &$params)
|
|
50
|
+ private function setBoudingBoxFilter(string $geometryColumnName, array &$params)
|
51
|
51
|
{
|
52
|
52
|
$boundingBox = isset($params['bbox']) ? $params['bbox'][0] : '';
|
53
|
53
|
if ($boundingBox) {
|
|
@@ -72,7 +72,7 @@ class GeoJsonService
|
72
|
72
|
public function _list(string $tableName, array $params): FeatureCollection
|
73
|
73
|
{
|
74
|
74
|
$geometryColumnName = $this->getGeometryColumnName($tableName, $params);
|
75
|
|
- $this->setBoudingBoxFilter($params);
|
|
75
|
+ $this->setBoudingBoxFilter($geometryColumnName, $params);
|
76
|
76
|
$records = $this->records->_list($tableName, $params);
|
77
|
77
|
$features = array();
|
78
|
78
|
foreach ($records->getRecords() as $record) {
|
|
@@ -84,7 +84,7 @@ class GeoJsonService
|
84
|
84
|
public function read(string $tableName, string $id, array $params): Feature
|
85
|
85
|
{
|
86
|
86
|
$geometryColumnName = $this->getGeometryColumnName($tableName, $params);
|
87
|
|
- $this->setBoudingBoxFilter($params);
|
|
87
|
+ $this->setBoudingBoxFilter($geometryColumnName, $params);
|
88
|
88
|
$record = $this->records->read($tableName, $id, $params);
|
89
|
89
|
return $this->convertRecordToFeature($record, $geometryColumnName);
|
90
|
90
|
}
|