Skip to content

Commit b6efffe

Browse files
committed
support tiles in GeoJSON
1 parent 6577aa3 commit b6efffe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4481,7 +4481,7 @@ class Feature implements \JsonSerializable
44814481
private $properties;
44824482
private $geometry;
44834483

4484-
public function __construct(string $id, array $properties, /*?Geometry*/ $geometry)
4484+
public function __construct($id, array $properties, /*?Geometry*/ $geometry)
44854485
{
44864486
$this->id = $id;
44874487
$this->properties = $properties;
@@ -4490,12 +4490,12 @@ public function __construct(string $id, array $properties, /*?Geometry*/ $geomet
44904490

44914491
public function serialize()
44924492
{
4493-
return array_filter([
4493+
return [
44944494
'type' => 'Feature',
44954495
'id' => $this->id,
44964496
'properties' => $this->properties,
44974497
'geometry' => $this->geometry,
4498-
]);
4498+
];
44994499
}
45004500

45014501
public function jsonSerialize()
@@ -4612,7 +4612,7 @@ private function convertTileToLatLonOfUpperLeftCorner($z, $x, $y): array
46124612

46134613
private function convertRecordToFeature( /*object*/$record, string $primaryKeyColumnName, string $geometryColumnName)
46144614
{
4615-
$id = '';
4615+
$id = null;
46164616
if ($primaryKeyColumnName) {
46174617
$id = $record[$primaryKeyColumnName];
46184618
}

0 commit comments

Comments
 (0)