1
0
forked from MTSR/mapserver

trains overlay fixes

This commit is contained in:
Thomas Rudin 2019-11-29 18:03:36 +01:00
parent 19f2690297
commit 89e6591f9a
2 changed files with 7 additions and 6 deletions

View File

@ -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);
}
});

View File

@ -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);
}
});