/
githubmirror
/
Leaflet
Обзор
Документация
Войти
/
githubmirror
/
Leaflet
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.0.2
debug/map/controls.html
46 строк
1 KB
Nathan Cahill
remove old CircleMarker options (#4497)
25 апр 2016, 15:54
25 апр 2016, 15:54
a5cf6b9
Код
Авторство
О чём код?
<!DOCTYPE html> <html> <head> <title>Leaflet debug page</title> <link rel="stylesheet" href="../../dist/leaflet.css" /> <link rel="stylesheet" href="../css/screen.css" /> <script type="text/javascript" src="../../build/deps.js"></script> <script src="../leaflet-include.js"></script> </head> <body> <div id="map"></div> <script type="text/javascript"> var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors', osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}), osm2 = new L.TileLayer(osmUrl, {attribution: 'Hello world'}); var map = new L.Map('map').addLayer(osm).setView(new L.LatLng(50.5, 30.512), 15); var marker = new L.Marker(new L.LatLng(50.5, 30.505)); map.addLayer(marker); marker.bindPopup("Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while still being accessible on older ones.").openPopup(); var marker2 = new L.Marker(new L.LatLng(50.502, 30.515)); map.addLayer(marker2); var layersControl = new L.Control.Layers({ 'OSM': osm, 'OSM2': osm2 }, { 'Some marker': marker, 'Another marker': marker2 }); map.addControl(layersControl); map.addControl(new L.Control.Scale()); </script> </body> </html>