Closed Lauranna closed 1 year ago
Hi @Lauranna,
you need to add following:
L.BrowserPrint.Utils.registerLayer(L.Marker, 'L.Marker', function(layer, utils) {
var options = utils.cloneOptions(layer.options);
if(layer.pm && layer.pm.getShape() === 'Text') {
options.text = layer.pm.getText();
delete options.icon;
}
return L.marker(layer.getLatLng(), options);
});
Thank you very much. It works.
Hello Igor-Vladyka,
thanks for your great plugin. I use the Leaflet Geoman-free plugin to give users the ability to insert graphics and text into the map themselves. All graphics are displayed wonderfully on the print page. Only the text in the text layer is not displayed. Here only an empty text field remains on the print page.
But all I see is that:
The text in the text box is missing. Do I have to include anything else here?
var browserPrint = L.control.browserPrint({ title: 'Bild exportieren', documentTitle: '...', printModes: [ L.BrowserPrint.Mode.Landscape("A4", {title: "Querformat"}), L.BrowserPrint.Mode.Portrait("A4", {title: "Hochformat"}) ], manualMode: false, closePopupsOnPrint: false, cancelWithEsc: false }).addTo(map);
I'm sorry, I'm quite a beginner, but I hope you understand my problem.
Regards, Lauranna