Files
leaflet/docs/examples/zoom-levels/example-scale.md
2022-10-20 21:18:26 +02:00

785 B

layout, title
layout title
tutorial_frame Zoom Levels Tutorial
<script> const map = L.map('map', { minZoom: 1, maxZoom: 1, dragging: false }); const cartodbAttribution = '© OpenStreetMap contributors, © CARTO'; const positron = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', { attribution: cartodbAttribution }).addTo(map); const scaleControl = L.control.scale({maxWidth: 150}).addTo(map); setInterval(() => { map.setView([0, 0], 0, {duration: 1, animate: true}); setTimeout(() => { map.setView([60, 0], 0, {duration: 1, animate: true}); }, 2000); }, 4000); map.setView([0, 0], 0); </script>