From: Jérémy Fabre Date: Mon, 24 Oct 2016 13:13:38 +0000 (+0200) Subject: Limit the map zoom level to 3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8c6af65e3602947478ccddba5253861406962f37;p=mezzo.git Limit the map zoom level to 3 --- diff --git a/app/static/src/js/modules/lightslidernetwork-init.js b/app/static/src/js/modules/lightslidernetwork-init.js index d1cd5c96..f386fa56 100644 --- a/app/static/src/js/modules/lightslidernetwork-init.js +++ b/app/static/src/js/modules/lightslidernetwork-init.js @@ -57,6 +57,10 @@ LightSliderNetworkInit.prototype.init = function() { that.initMarkers(); }); + google.maps.event.addListener(that.map, 'zoom_changed', function() { + if (that.map.getZoom() < 3) that.map.setZoom(3); + }); + } };