2013-05-29 07:30:53 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
|
|
|
<link rel="stylesheet" href="../css/screen.css" />
|
|
|
|
|
|
|
|
|
2016-04-29 17:35:50 +08:00
|
|
|
<script src="../leaflet-include.js"></script>
|
2013-05-29 07:30:53 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="map"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
//Init a map, and attempt a locate.
|
|
|
|
var map = L.map('map', {
|
|
|
|
center: [39.84, -96.591],
|
2015-07-14 16:27:50 +08:00
|
|
|
zoom: 4,
|
|
|
|
preferCanvas: true
|
2013-05-29 07:30:53 +08:00
|
|
|
}).locate();
|
|
|
|
|
2018-03-12 15:46:20 +08:00
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
|
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
2013-05-29 07:30:53 +08:00
|
|
|
}).addTo(map);
|
|
|
|
|
|
|
|
var vanillaLayer = new L.LayerGroup();
|
|
|
|
map.addLayer(vanillaLayer);
|
|
|
|
|
|
|
|
map.on('moveend',function(e) {
|
|
|
|
console.log('moveend fired.')
|
|
|
|
});
|
|
|
|
|
|
|
|
//For experiments using setRadius
|
2016-04-29 17:35:50 +08:00
|
|
|
var marker = L.circleMarker(map.getCenter(),{radius:30}).addTo(vanillaLayer);
|
2013-05-29 07:30:53 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
2013-11-08 22:43:14 +08:00
|
|
|
</html>
|