1// JavaScript Document 2 3L.TileGrid = L.GridLayer.extend({ 4 5 6 createTile: function (coords) { 7 const tile = document.createElement('canvas'); 8 const ctx = tile.getContext('2d'); 9 tile.width = tile.height = 256; 10 ctx.clearRect(0, 0, 256, 256); 11 12 var txt = coords.x + ' / ' + coords.y + ', zoom: ' + coords.z 13 var metrics = ctx.measureText(txt); 14 var w = metrics.width; 15 16 ctx.fillStyle = 'rgba(250,250,250, 0.7)'; 17 ctx.fillRect(0, 0, w + 24, 16); 18 19 ctx.font = '12px Arial'; 20 ctx.fillStyle = 'blue'; 21 ctx.fillText(txt, 8, 12); 22 23 ctx.strokeStyle = 'red'; 24 ctx.lineWidth = 1; 25 26 ctx.beginPath(); 27 ctx.moveTo(0, 0); 28 ctx.lineTo(255, 0); 29 ctx.lineTo(255, 255); 30 // ctx.lineTo(0, 255); 31 // ctx.closePath(); 32 ctx.stroke(); 33 34 return tile; 35 }, 36 37 38}); 39 40L.tilegrid = function (options) { 41 return new L.TileGrid(options); 42};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.