Hide zoom controls on mobile

This commit is contained in:
Gautier P 2020-05-24 21:23:58 +02:00
parent a358aed464
commit 92ad30be17
2 changed files with 28 additions and 6 deletions

View file

@ -12,12 +12,15 @@ BR.Map = {
minZoom: 0,
maxZoom: maxZoom
});
L.control
.zoom({
zoomInTitle: i18next.t('map.zoomInTitle'),
zoomOutTitle: i18next.t('map.zoomOutTitle')
})
.addTo(map);
if (BR.Util.getResponsiveBreakpoint() >= '3md') {
L.control
.zoom({
zoomInTitle: i18next.t('map.zoomInTitle'),
zoomOutTitle: i18next.t('map.zoomOutTitle')
})
.addTo(map);
}
if (!map.restoreView()) {
map.setView(BR.conf.initialMapLocation || [50.99, 9.86], BR.conf.initialMapZoom || 5);
}