Commit bfa6b88f authored by David's avatar David Committed by Peter Tönnies

The map is zoomed out in case no address is specified instead of showing the ocean

parent 65a3f23c
Pipeline #83586913 passed with stages
in 9 minutes and 23 seconds
......@@ -42,6 +42,7 @@
- Add backend logic for changing basket locations !1021 @alex.simm
- Updated the wording regarding "not more than 2 foodsavers per pickup !1029 @peter.toennies
- Fixed bell notifications for new wallposts in stores !1030 @jofranz
- The map is zoomed out in case no address is specified instead of showing the ocean !1053 @dthulke
## Bugfixes
- Profile button "remove from all slots" is now only enabled for orga !968 #362 @fs_k
......
......@@ -45,7 +45,11 @@ class MapControl extends Control
$this->pageHelper->addJs('u_init_map();');
if ($center) {
$this->pageHelper->addJs('u_map.setView([' . $center['lat'] . ',' . $center['lon'] . '],15);');
if ($center['lat'] == 0 && $center['lon'] == 0) {
$this->pageHelper->addJs('u_map.fitBounds([[46.0, 4.0],[55.0, 17.0]]);');
} else {
$this->pageHelper->addJs('u_map.setView([' . $center['lat'] . ',' . $center['lon'] . '],15);');
}
}
$this->pageHelper->addJs('map.initMarker(' . $jsarr . ');');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment