Skip to content

Commit

Permalink
Fix: geojson export
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Oct 3, 2020
1 parent f555981 commit 9e5224b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Admin/LocationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ private function exportGeoJSON(string $filename, array $rows, int $maxlevel): Re
Gedcom::PLACE_SEPARATOR,
array_reverse(
array_filter(
array_slice($place, 1, $maxlevel + 1)
array_slice($place, 1, $maxlevel)
)
)
);
Expand All @@ -422,8 +422,8 @@ private function exportGeoJSON(string $filename, array $rows, int $maxlevel): Re
'geometry' => [
'type' => 'Point',
'coordinates' => [
$this->gedcom_service->readLongitude($place['pl_long'] ?? ''),
$this->gedcom_service->readLatitude($place['pl_lati'] ?? ''),
$this->gedcom_service->readLongitude($place[$maxlevel + 1]),
$this->gedcom_service->readLatitude($place[$maxlevel + 2]),
],
],
'properties' => [
Expand Down

0 comments on commit 9e5224b

Please sign in to comment.