Closed AlbertoMCS closed 1 year ago
I managed to fix it by changing onAdd
L.Control.Mylegend = L.Control.extend({
onAdd: function (mymap) {
var div = L.DomUtil.create('div', 'info legend-leaflet')
div.innerHTML = document.getElementById("legend").innerHTML
return div;
}
});
Hi Igor, I hope you are very well. I have an issue with the plugging. I created a control to contain a legend. I can print and the legend is showed in the pdf, so all good. The problem comes when the print ends, as the legend is not showed anymore in my map. When clicking on the print button again I got this error:
Here my code:
HTML (content of the legend)
JS
Many thanks!