add depth to coverage model

This commit is contained in:
Arno Kaimbacher 2019-03-29 18:29:20 +01:00
parent 52b166601c
commit 2f930457d1
13 changed files with 306 additions and 187 deletions

View file

@ -410,15 +410,15 @@ class IndexController extends Controller
}
}
if (isset($data['geolocation'])) {
$formGeolocation = $request->input('geolocation');
if ($formGeolocation['xmin'] !== null && $formGeolocation['ymin'] !== null &&
$formGeolocation['xmax'] !== null && $formGeolocation['ymax'] !== null) {
$geolocation = new GeolocationBox($formGeolocation);
$dataset->geolocation()->save($geolocation);
//$geolocation->dataset()->associate($dataset)->save();
}
}
// if (isset($data['geolocation'])) {
// $formGeolocation = $request->input('geolocation');
// if ($formGeolocation['xmin'] !== null && $formGeolocation['ymin'] !== null &&
// $formGeolocation['xmax'] !== null && $formGeolocation['ymax'] !== null) {
// $geolocation = new GeolocationBox($formGeolocation);
// $dataset->geolocation()->save($geolocation);
// //$geolocation->dataset()->associate($dataset)->save();
// }
// }
if (isset($data['coverage'])) {
$formCoverage = $request->input('coverage');