L.Control.Help = L.Control.extend({
options : {
title : 'Info',
content: "sample window"
},
makeIcon: function() {
let iconDiv = '
'
iconDiv += `
`;
iconDiv += '
';
return iconDiv;
},
onAdd: function (map) {
const menuDiv = L.DomUtil.create('div', 'settings-control menu-button');
let icon = this.makeIcon();
menuDiv.innerHTML = icon;
L.DomEvent.on(menuDiv, {
click: this.display,
}, this);
return menuDiv;
},
display: function(){
var win = L.control.window(
this._map,
{
title:this.options.title,
content:this.options.content
}
).show();
},
});
L.control.help = function (opts) {
const help = new L.Control.Help(opts);
return help;
}