5ffe207921
* Use https everywhere for OSM tile URLs Use https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png instead of http://{s}.tile.osm.org/{z}/{x}/{y}.png http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png * Use https everywhere for OSM attribution link Use https://www.openstreetmap.org/copyright instead of http://www.openstreetmap.org/copyright http://osm.org/copyright
30 lines
769 B
Markdown
30 lines
769 B
Markdown
---
|
|
layout: tutorial_frame
|
|
title: Zoom Levels Tutorial
|
|
---
|
|
<script>
|
|
|
|
var map = L.map('map', {
|
|
minZoom: 1,
|
|
maxZoom: 1,
|
|
dragging: false
|
|
});
|
|
|
|
var cartodbAttribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
|
|
|
|
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
|
attribution: cartodbAttribution
|
|
}).addTo(map);
|
|
|
|
L.control.scale({maxWidth: 150}).addTo(map);
|
|
|
|
setInterval(function(){
|
|
map.setView([0, 0], 0, {duration: 1, animate: true});
|
|
setTimeout(function(){
|
|
map.setView([60, 0], 0, {duration: 1, animate: true});
|
|
}, 2000);
|
|
}, 4000);
|
|
|
|
map.setView([0, 0], 0);
|
|
</script>
|