fix TileLayer.Canvas drawTile zoom argument

This commit is contained in:
Vladimir Agafonkin 2012-10-31 02:02:12 +02:00
parent 3c7b66b56c
commit 7ed96d6ed1
4 changed files with 12 additions and 13 deletions

View File

@ -51,6 +51,7 @@ An in-progress version being developed on the master branch.
* Fixed a bug where `Map` `load` event happened too late (after `moveend`, etc.) (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1027](https://github.com/CloudMade/Leaflet/pull/1027)
* Fixed `Circle` `getBounds` to return correct bounds and work without adding the circle to a map. [#1068](https://github.com/CloudMade/Leaflet/issues/1068)
* Fixed a bug where removing `Popup` on `viewreset` throwed an error (by [fnicollet](https://github.com/fnicollet) and [@danzel](https://github.com/danzel)). [#1098](https://github.com/CloudMade/Leaflet/pull/1098) [#1094](https://github.com/CloudMade/Leaflet/issues/1094)
* Fixed a bug where `TileLayer.Canvas` `drawTile` didn't receive tile zoom level in arguments.
#### Browser bugfixes

9
dist/leaflet-src.js vendored
View File

@ -2579,7 +2579,7 @@ L.TileLayer.Canvas = L.TileLayer.extend({
},
_redrawTile: function (tile) {
this.drawTile(tile, tile._tilePoint, tile._zoom);
this.drawTile(tile, tile._tilePoint, this._map._zoom);
},
_createTileProto: function () {
@ -2596,19 +2596,18 @@ L.TileLayer.Canvas = L.TileLayer.extend({
return tile;
},
_loadTile: function (tile, tilePoint, zoom) {
_loadTile: function (tile, tilePoint) {
tile._layer = this;
tile._tilePoint = tilePoint;
tile._zoom = zoom;
this.drawTile(tile, tilePoint, zoom);
this._redrawTile(tile);
if (!this.options.async) {
this.tileDrawn(tile);
}
},
drawTile: function (tile, tilePoint, zoom) {
drawTile: function (tile, tilePoint) {
// override with rendering code
},

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long

View File

@ -19,7 +19,7 @@ L.TileLayer.Canvas = L.TileLayer.extend({
},
_redrawTile: function (tile) {
this.drawTile(tile, tile._tilePoint, tile._zoom);
this.drawTile(tile, tile._tilePoint, this._map._zoom);
},
_createTileProto: function () {
@ -36,19 +36,18 @@ L.TileLayer.Canvas = L.TileLayer.extend({
return tile;
},
_loadTile: function (tile, tilePoint, zoom) {
_loadTile: function (tile, tilePoint) {
tile._layer = this;
tile._tilePoint = tilePoint;
tile._zoom = zoom;
this.drawTile(tile, tilePoint, zoom);
this._redrawTile(tile);
if (!this.options.async) {
this.tileDrawn(tile);
}
},
drawTile: function (tile, tilePoint, zoom) {
drawTile: function (tile, tilePoint) {
// override with rendering code
},