mapserver/server/static/js/overlays/LabelOverlay.js

16 lines
376 B
JavaScript
Raw Normal View History

2019-02-08 17:12:40 +03:00
'use strict';
var LabelOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
2019-02-08 20:06:16 +03:00
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "label");
2019-02-08 17:12:40 +03:00
},
getIcon: function(lbl){
return L.divIcon({html: lbl.attributes.text});
},
createPopup: function(lbl){
return "<pre>" + lbl.attributes.text + "</pre>";
}
});