/
githubmirror
/
Leaflet
Обзор
Документация
Войти
/
githubmirror
/
Leaflet
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
debug/tests/rtl.html
38 строк
962 B
Simon Legner
Rename `Map` to `LeafletMap` and keep `Map` as alias (#9892)
11 ноя 2025, 21:28
Не верифицирован
11 ноя 2025, 21:28
2e9b617
Код
Авторство
О чём код?
<!doctype html> <html> <head> <meta charset="utf-8" /> <title>Leaflet debug page - RTL</title> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" /> <link rel="stylesheet" href="../../dist/leaflet.css" /> <link rel="stylesheet" href="../css/screen.css" /> <style> body { direction: rtl; } </style> <script type="importmap"> { "imports": { "leaflet": "../../dist/leaflet-src.js" } } </script> </head> <body> <p>Click the map to place a popup at the mouse location</p> <div id="map"></div> <script type="module"> import {LeafletMap, TileLayer, Popup} from 'leaflet'; const osm = new TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png'); const map = new LeafletMap('map') .setView([50.5, 30.51], 15) .addLayer(osm); map.on('click', (e) => { new Popup().setLatLng(e.latlng).setContent('Hello').openOn(map); }); </script> </body> </html>