forked from MTSR/mapserver
trains overlay fixes
This commit is contained in:
parent
19f2690297
commit
89e6591f9a
@ -44,7 +44,7 @@ export default L.LayerGroup.extend({
|
||||
|
||||
this.currentObjects = {}; // name => marker
|
||||
|
||||
this.reDraw = this.reDraw.bind(this);
|
||||
this.onMinetestUpdate = this.onMinetestUpdate.bind(this);
|
||||
},
|
||||
|
||||
createPopup: function(train){
|
||||
@ -67,7 +67,7 @@ export default L.LayerGroup.extend({
|
||||
|
||||
|
||||
getMaxDisplayedZoom: function(){
|
||||
return 8;
|
||||
return 10;
|
||||
},
|
||||
|
||||
createMarker: function(train){
|
||||
@ -180,12 +180,12 @@ export default L.LayerGroup.extend({
|
||||
|
||||
onAdd: function(map) {
|
||||
this.map = map;
|
||||
wsChannel.addListener("minetest-info", () => this.onMinetestUpdate());
|
||||
wsChannel.addListener("minetest-info", this.onMinetestUpdate);
|
||||
this.reDraw();
|
||||
},
|
||||
|
||||
onRemove: function(/*map*/) {
|
||||
this.clearLayers();
|
||||
wsChannel.removeListener("minetest-info", () => this.onMinetestUpdate());
|
||||
wsChannel.removeListener("minetest-info", this.onMinetestUpdate);
|
||||
}
|
||||
});
|
||||
|
@ -27,6 +27,7 @@ export default L.LayerGroup.extend({
|
||||
L.LayerGroup.prototype.initialize.call(this);
|
||||
|
||||
this.currentObjects = {}; // name => marker
|
||||
this.onMinetestUpdate = this.onMinetestUpdate.bind(this);
|
||||
},
|
||||
|
||||
createPopup: function(signal){
|
||||
@ -140,12 +141,12 @@ export default L.LayerGroup.extend({
|
||||
|
||||
onAdd: function(map) {
|
||||
this.map = map;
|
||||
wsChannel.addListener("minetest-info", () => this.onMinetestUpdate());
|
||||
wsChannel.addListener("minetest-info", this.onMinetestUpdate);
|
||||
this.reDraw();
|
||||
},
|
||||
|
||||
onRemove: function(/*map*/) {
|
||||
this.clearLayers();
|
||||
wsChannel.removeListener("minetest-info", () => this.onMinetestUpdate());
|
||||
wsChannel.removeListener("minetest-info", this.onMinetestUpdate);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user