Skip to content

Commit

Permalink
return just one pin for post
Browse files Browse the repository at this point in the history
  • Loading branch information
Mh-Asmi committed May 10, 2024
1 parent cb369dd commit 463e2e4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public function toArray($request)
$data['geojson']['features'][$key] = $feature;
}
}
// 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]);
}
}
unset($data['hide_location']);
return $data;
}
Expand Down

0 comments on commit 463e2e4

Please sign in to comment.