2013-02-15 12:04:53 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Leaflet debug page</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2013-02-15 12:04:53 +08:00
|
|
|
<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);
|
|
|
|
|
2014-03-04 23:54:41 +08:00
|
|
|
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
2014-03-05 00:04:00 +08:00
|
|
|
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
2013-02-15 12:04:53 +08:00
|
|
|
}).addTo(map);
|
|
|
|
|
|
|
|
var a_popup = L.popup().setContent('Previously created')
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2013-02-15 12:04:53 +08:00
|
|
|
marker2.bindPopup(a_popup);
|
|
|
|
</script>
|
|
|
|
</body>
|
2013-03-22 22:27:07 +08:00
|
|
|
</html>
|