diff --git a/static/js/overlays/TrainOverlay.js b/static/js/overlays/TrainOverlay.js index 4bd19ab..badf7a3 100644 --- a/static/js/overlays/TrainOverlay.js +++ b/static/js/overlays/TrainOverlay.js @@ -179,7 +179,8 @@ export default L.LayerGroup.extend({ }, - onAdd: function(/*map*/) { + onAdd: function(map) { + this.map = map; this.layerMgr.addListener(() => this.reDraw()); this.wsChannel.addListener("minetest-info", () => this.onMinetestUpdate()); this.reDraw();