'use strict'; var LabelIcon = L.Icon.extend({ initialize: function(options) { L.Icon.prototype.initialize.call(this, options); }, createIcon: function (oldIcon) { var div = document.createElement('div'), options = this.options; div.innerHTML = options.html || ""; return div; } }); var LabelOverlay = AbstractIconOverlay.extend({ initialize: function(wsChannel, layerMgr) { AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "label"); }, getIcon: function(lbl){ return new LabelIcon({ iconAnchor: [15, 50], iconSize: [30, 100], html: "" + lbl.attributes.text + "" }); }, createPopup: function(lbl){ return "

" + lbl.attributes.text + "

"; } });