Simon Legner 2e9b617805
Rename Map to LeafletMap and keep Map as alias (#9892)
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2025-11-11 19:28:33 +01:00

22 lines
708 B
Markdown

---
layout: tutorial_frame
title: Accessible Markers Example
---
<script type="module">
import L, {LeafletMap, TileLayer, Marker, Icon} from 'leaflet';
const map = new LeafletMap('map').setView([50.4501, 30.5234], 4);
const tiles = new TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
const marker = new Marker([50.4501, 30.5234], {alt: 'Kyiv'}).addTo(map)
.bindPopup('Kyiv, Ukraine is the birthplace of Leaflet!');
globalThis.L = L; // only for debugging in the developer console
globalThis.map = map; // only for debugging in the developer console
</script>