Merge pull request #3508 from JLyne/leaflet-fix

Fix DynmapTileLayer sharing object instances
This commit is contained in:
mikeprimm 2021-10-04 14:51:58 -05:00 committed by GitHub
commit faccb8d604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -75,10 +75,17 @@ var DynmapLayerControl = L.Control.Layers.extend({
var DynmapTileLayer = L.TileLayer.extend({
_namedTiles: {},
_cachedTileUrls: {},
_loadQueue: [],
_loadingTiles: [],
_namedTiles: null,
_cachedTileUrls: null,
_loadQueue: null,
_loadingTiles: null,
initialize: function() {
this._namedTiles = {};
this._cachedTileUrls = {};
this._loadQueue = [];
this._loadingTiles = [];
},
createTile: function(coords, done) {
var me = this,

View File

@ -35,6 +35,7 @@ var HDMapType = DynmapTileLayer.extend({
this.projection = new HDProjection($.extend({map: this}, options));
L.Util.setOptions(this, options);
DynmapTileLayer.prototype.initialize.call(this, options);
},
getTileName: function(coords) {
var info = this.getTileInfo(coords);