1
0
forked from MTSR/mapserver
mapserver/static/js/map/WorldInfoDisplay.js
2019-12-29 15:43:46 +01:00

21 lines
533 B
JavaScript

/* exported WorldInfoDisplay */
import WorldStats from '../components/WorldStats.js';
// coord display
export default L.Control.extend({
initialize: function(wsChannel, opts) {
L.Control.prototype.initialize.call(this, opts);
this.wsChannel = wsChannel;
},
onAdd: function() {
var div = L.DomUtil.create('div', 'leaflet-bar leaflet-custom-display');
this.wsChannel.addListener("minetest-info", function(info){
m.render(div, WorldStats(info));
});
return div;
}
});