Skip to content

Commit

Permalink
remove empty points
Browse files Browse the repository at this point in the history
  • Loading branch information
Mh-Asmi committed Feb 6, 2025
1 parent 4d133a5 commit a264adc
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ public function toArray($request)
}
}
// TODO : next code just keep the first location , later we may add a flag for primary location field
foreach ($data['geojson']['features'] as $key => $feature) {
if ($key > 0) {
unset($data['geojson']['features'][$key]);
if (isset($data['geojson'])) {
foreach ($data['geojson']['features'] as $key => $feature) {
if ($key > 0) {
unset($data['geojson']['features'][$key]);
}
}
}
unset($data['hide_location']);
Expand Down

0 comments on commit a264adc

Please sign in to comment.