Browse Source

support tiles in GeoJSON

Maurits van der Schee 5 years ago
parent
commit
b6efffe7e0
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      api.php

+ 4
- 4
api.php View File

@@ -4481,7 +4481,7 @@ class Feature implements \JsonSerializable
4481 4481
     private $properties;
4482 4482
     private $geometry;
4483 4483
 
4484
-    public function __construct(string $id, array $properties, /*?Geometry*/ $geometry)
4484
+    public function __construct($id, array $properties, /*?Geometry*/ $geometry)
4485 4485
     {
4486 4486
         $this->id = $id;
4487 4487
         $this->properties = $properties;
@@ -4490,12 +4490,12 @@ class Feature implements \JsonSerializable
4490 4490
 
4491 4491
     public function serialize()
4492 4492
     {
4493
-        return array_filter([
4493
+        return [
4494 4494
             'type' => 'Feature',
4495 4495
             'id' => $this->id,
4496 4496
             'properties' => $this->properties,
4497 4497
             'geometry' => $this->geometry,
4498
-        ]);
4498
+        ];
4499 4499
     }
4500 4500
 
4501 4501
     public function jsonSerialize()
@@ -4612,7 +4612,7 @@ class GeoJsonService
4612 4612
 
4613 4613
     private function convertRecordToFeature( /*object*/$record, string $primaryKeyColumnName, string $geometryColumnName)
4614 4614
     {
4615
-        $id = '';
4615
+        $id = null;
4616 4616
         if ($primaryKeyColumnName) {
4617 4617
             $id = $record[$primaryKeyColumnName];
4618 4618
         }

Loading…
Cancel
Save