Set minZoom attribute to the events map

This commit is contained in:
Saivann 2014-03-20 12:23:15 -04:00
parent 433bd50ed1
commit f998664c88

View file

@ -14,8 +14,9 @@ id: events
<div id="eventmap" class="eventmap"></div> <div id="eventmap" class="eventmap"></div>
<script> <script>
var zoom=2; var zoom=2;
if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))zoom=0; var minzoom=1;
var map = L.map('eventmap').setView([20.00, 10.00], zoom); if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))var zoom=minzoom=0;
var map = L.map('eventmap',{ 'zoom': zoom, 'minZoom': minzoom, 'center': [20.00, 10.00]});
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Data &copy; by <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>.', attribution: 'Data &copy; by <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>.',
maxZoom: 18 maxZoom: 18