5ffe207921
* Use https everywhere for OSM tile URLs Use https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png instead of http://{s}.tile.osm.org/{z}/{x}/{y}.png http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png * Use https everywhere for OSM attribution link Use https://www.openstreetmap.org/copyright instead of http://www.openstreetmap.org/copyright http://osm.org/copyright
37 lines
908 B
HTML
37 lines
908 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Leaflet debug page</title>
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
|
|
|
<link rel="stylesheet" href="../css/screen.css" />
|
|
<script src="../leaflet-include.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="map" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
|
|
|
|
<script>
|
|
var map = L.map('map');
|
|
|
|
var marker = L.marker([51.5, -0.09])
|
|
.bindPopup("<b>Hello world!</b><br />I am a popup.")
|
|
.addTo(map);
|
|
//.openPopup();
|
|
|
|
var marker2 = L.marker([51.525, -0.09])
|
|
.addTo(map);
|
|
|
|
map.setView([51.505, -0.09], 13);
|
|
|
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
|
}).addTo(map);
|
|
|
|
var a_popup = L.popup().setContent('Previously created')
|
|
|
|
marker2.bindPopup(a_popup);
|
|
</script>
|
|
</body>
|
|
</html>
|