Skip to content

Commit faccb8d

Browse files
authored
Merge pull request #3508 from JLyne/leaflet-fix
Fix DynmapTileLayer sharing object instances
2 parents 3a7a4a8 + 0630b2f commit faccb8d

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

DynmapCore/src/main/resources/extracted/web/js/dynmaputils.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,17 @@ var DynmapLayerControl = L.Control.Layers.extend({
7575

7676

7777
var DynmapTileLayer = L.TileLayer.extend({
78-
_namedTiles: {},
79-
_cachedTileUrls: {},
80-
_loadQueue: [],
81-
_loadingTiles: [],
78+
_namedTiles: null,
79+
_cachedTileUrls: null,
80+
_loadQueue: null,
81+
_loadingTiles: null,
82+
83+
initialize: function() {
84+
this._namedTiles = {};
85+
this._cachedTileUrls = {};
86+
this._loadQueue = [];
87+
this._loadingTiles = [];
88+
},
8289

8390
createTile: function(coords, done) {
8491
var me = this,

DynmapCore/src/main/resources/extracted/web/js/hdmap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var HDMapType = DynmapTileLayer.extend({
3535
this.projection = new HDProjection($.extend({map: this}, options));
3636

3737
L.Util.setOptions(this, options);
38+
DynmapTileLayer.prototype.initialize.call(this, options);
3839
},
3940
getTileName: function(coords) {
4041
var info = this.getTileInfo(coords);

0 commit comments

Comments
 (0)