2013-05-29 07:30:53 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
|
|
|
<link rel="stylesheet" href="../css/screen.css" />
|
|
|
|
|
|
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="map"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
//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();
|
|
|
|
|
|
|
|
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
|
|
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
|
|
|
}).addTo(map);
|
|
|
|
|
|
|
|
var vanillaLayer = new L.LayerGroup();
|
|
|
|
map.addLayer(vanillaLayer);
|
|
|
|
|
|
|
|
map.on('moveend',function(e) {
|
|
|
|
console.log('moveend fired.')
|
|
|
|
});
|
|
|
|
|
|
|
|
//For experiments using setRadius
|
|
|
|
window.marker = L.circleMarker(map.getCenter(),{radius:30}).addTo(vanillaLayer);
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript" src="../../build/deps.js"></script>
|
|
|
|
|
|
|
|
<script src="../leaflet-include.js"></script>
|
|
|
|
|
|
|
|
</body>
|
2013-11-08 22:43:14 +08:00
|
|
|
</html>
|