Merge pull request #4094 from jblarsen/fix-3986
Use _tileCoordsToKey everywhere
This commit is contained in:
commit
3fd2d5cb75
@ -293,9 +293,11 @@ L.GridLayer = L.Layer.extend({
|
||||
_retainParent: function (x, y, z, minZoom) {
|
||||
var x2 = Math.floor(x / 2),
|
||||
y2 = Math.floor(y / 2),
|
||||
z2 = z - 1;
|
||||
z2 = z - 1,
|
||||
coords2 = new L.Point(+x2, +y2);
|
||||
coords2.z = +z2;
|
||||
|
||||
var key = x2 + ':' + y2 + ':' + z2,
|
||||
var key = this._tileCoordsToKey(coords2),
|
||||
tile = this._tiles[key];
|
||||
|
||||
if (tile && tile.active) {
|
||||
@ -318,7 +320,10 @@ L.GridLayer = L.Layer.extend({
|
||||
for (var i = 2 * x; i < 2 * x + 2; i++) {
|
||||
for (var j = 2 * y; j < 2 * y + 2; j++) {
|
||||
|
||||
var key = i + ':' + j + ':' + (z + 1),
|
||||
var coords = new L.Point(i, j);
|
||||
coords.z = z + 1;
|
||||
|
||||
var key = this._tileCoordsToKey(coords),
|
||||
tile = this._tiles[key];
|
||||
|
||||
if (tile && tile.active) {
|
||||
|
Loading…
Reference in New Issue
Block a user