Script and makefile adjustments for updating extlib
[larjonas-mediagoblin.git] / extlib / leaflet / debug / map / canvas.html
blob233035f162932f546d860a257c9af2cf3ba2fb20
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Leaflet debug page</title>
6 <link rel="stylesheet" href="../../dist/leaflet.css" />
7 <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
9 <link rel="stylesheet" href="../css/screen.css" />
11 <script src="../leaflet-include.js"></script>
12 </head>
13 <body>
15 <div id="map" style="width: 600px; height: 600px; border: 1px solid #ccc"></div>
17 <script type="text/javascript">
19 var tiles = new L.TileLayer.Canvas();
21 tiles.drawTile = function(canvas, tile, zoom) {
22 var ctx = canvas.getContext('2d');
24 ctx.fillStyle = 'white';
25 ctx.fillRect(0, 0, 255, 255);
28 ctx.fillStyle = 'black';
29 ctx.fillText('x: ' + tile.x + ', y: ' + tile.y + ', zoom:' + zoom, 20, 20);
32 ctx.strokeStyle = 'red';
33 ctx.beginPath();
34 ctx.moveTo(0, 0);
35 ctx.lineTo(255, 0);
36 ctx.lineTo(255, 255);
37 ctx.lineTo(0, 255);
38 ctx.closePath();
39 ctx.stroke();
42 var map = new L.Map('map', {center: new L.LatLng(50.5, 30.51), zoom: 15, layers: [tiles]});
44 </script>
45 </body>
46 </html>