leaflet
Version:
JavaScript library for mobile-friendly interactive maps
43 lines (32 loc) • 1.21 kB
HTML
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="../../dist/leaflet.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/screen.css" />
<script src="../leaflet-include.js"></script>
</head>
<body>
<div id="map"></div>
<button id="populate">Populate with 10 markers</button>
<script>
var myCenter = new L.LatLng(50.5, 30.51);
var map = new L.Map('map', {center: myCenter, zoom: 15});
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
}).addTo(map);
map.on('mousemove', function() {
console.log('map mousemove');
});
var myRenderer = L.canvas();
L.circle(myCenter, 1200, {renderer: myRenderer})
.addTo(map)
.on('mousemove', function(e) {
L.DomEvent.preventDefault(e);
L.DomEvent.stop(e);
console.log('canvas mousemove');
});
</script>
</body>
</html>