1 L
.TileLayer
.Canvas
= L
.TileLayer
.extend({
6 initialize: function(options
) {
7 L
.Util
.setOptions(this, options
);
10 _createTileProto: function() {
11 this._canvasProto
= L
.DomUtil
.create('canvas', 'leaflet-tile');
13 var tileSize
= this.options
.tileSize
;
14 this._canvasProto
.width
= tileSize
;
15 this._canvasProto
.height
= tileSize
;
18 _createTile: function() {
19 var tile
= this._canvasProto
.cloneNode(false);
20 tile
.onselectstart
= tile
.onmousemove
= L
.Util
.falseFn
;
24 _loadTile: function(tile
, tilePoint
, zoom
) {
27 this.drawTile(tile
, tilePoint
, zoom
);
29 if (!this.options
.async
) {
34 drawTile: function(tile
, tilePoint
, zoom
) {
35 // override with rendering code
38 tileDrawn: function(tile
) {
39 this._tileOnLoad
.call(tile
);