Leaflet/debug/tests/svg_clicks.html
Thach Hoang 0d1eae32be Fix debug examples after rollup (#5417)
Fix #5373.

- Remove references to removed file "../../build/deps.js"
- Update leaflet-include.js to point to "../dist/leaflet-src.js"
- Update watch to use the same destination file as rollup (dist/leaflet-src.js)
- Define getRandomLatLng where used
2017-03-28 08:40:48 +02:00

54 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../../dist/leaflet.css" />
<link rel="stylesheet" href="../css/screen.css" />
<script src="../leaflet-include.js"></script>
<script src="http://code.jquery.com/jquery-1.8.0.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var map;
var myLayerGroup = new L.LayerGroup();
initmap();
function initmap() {
// set up the map
map = new L.Map('map');
// create the tile layer with correct attribution
var osmUrl = 'http://a.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17 });
map.addLayer(osm);
map.fitBounds(new L.LatLngBounds([51,7],[51,7]));
var route = L.polyline([
[51, 7.000],
[51.002, 7.004],
[51.004, 7.006]
]).addTo(map).on('click',function(e){console.log('bottom')})
var route2 = L.polyline([
[51, 7.000],
[51.002, 7.004]
],
{ interactive:false,color:'#f00' }
).addTo(map);
// when the mouse hovers over the red route2, you cannot click through the blue route1 beneath
};
</script>
</body>
</html>