mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-25 03:35:18 +01:00
Fix break in namedTile during integrate of updated Leaflet
This commit is contained in:
parent
0c9cfedb6e
commit
1aa3d07e6a
@ -107,13 +107,12 @@ var DynmapTileLayer = L.TileLayer.extend({
|
|||||||
|
|
||||||
this._container.appendChild(fragment);
|
this._container.appendChild(fragment);
|
||||||
},
|
},
|
||||||
|
//Copy and mod of Leaflet method - marked changes with Dynmap: to simplify reintegration
|
||||||
_addTile: function(tilePoint, container) {
|
_addTile: function(tilePoint, container) {
|
||||||
if(this._container == null) // Ignore if we've stopped being active layer
|
|
||||||
return;
|
|
||||||
var tilePos = this._getTilePos(tilePoint),
|
var tilePos = this._getTilePos(tilePoint),
|
||||||
zoom = this._map.getZoom(),
|
zoom = this._map.getZoom(),
|
||||||
key = tilePoint.x + ':' + tilePoint.y,
|
key = tilePoint.x + ':' + tilePoint.y,
|
||||||
|
name = this.getTileName(tilePoint, zoom), //Dynmap
|
||||||
tileLimit = (1 << zoom);
|
tileLimit = (1 << zoom);
|
||||||
|
|
||||||
// wrap tile coordinates
|
// wrap tile coordinates
|
||||||
@ -133,9 +132,12 @@ var DynmapTileLayer = L.TileLayer.extend({
|
|||||||
|
|
||||||
// create tile
|
// create tile
|
||||||
var tile = this._createTile();
|
var tile = this._createTile();
|
||||||
|
tile.tileName = name; //Dynmap
|
||||||
|
tile.tilePoint = tilePoint; //Dynmap
|
||||||
L.DomUtil.setPosition(tile, tilePos);
|
L.DomUtil.setPosition(tile, tilePos);
|
||||||
|
|
||||||
this._tiles[key] = tile;
|
this._tiles[key] = tile;
|
||||||
|
this._namedTiles[name] = tile; //Dynmap
|
||||||
|
|
||||||
if (this.options.scheme == 'tms') {
|
if (this.options.scheme == 'tms') {
|
||||||
tilePoint.y = tileLimit - tilePoint.y - 1;
|
tilePoint.y = tileLimit - tilePoint.y - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user