Files
leaflet/docs/examples/mobile/example.md
Florian Bischof 999a074eb8 Add Ukraini dialog (#8177)
* Add Ukraini dialog

* Fix lint

* Make it more keyboard-user friendly

* Change close element to button and add dialog as first element
2022-04-25 11:57:58 +03:00

1.1 KiB

layout, title, css
layout title css
tutorial_frame Mobile tutorial body { padding: 0; margin: 0; } #map { height: 100%; width: 100vw; }
<script> var map = L.map('map').fitWorld(); var tiles = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, ' + 'Imagery © Mapbox', id: 'mapbox/streets-v11', tileSize: 512, zoomOffset: -1 }).addTo(map); function onLocationFound(e) { var radius = e.accuracy / 2; var locationMarker = L.marker(e.latlng).addTo(map) .bindPopup('You are within ' + radius + ' meters from this point').openPopup(); var locationCircle = L.circle(e.latlng, radius).addTo(map); } function onLocationError(e) { alert(e.message); } map.on('locationfound', onLocationFound); map.on('locationerror', onLocationError); map.locate({setView: true, maxZoom: 16}); </script>