Closed klaupher closed 3 years ago
completing..
this is my code out print:
L.control.graphicScale({
fill: 'hollow',
imperial: false,
position: 'bottomleft',
doubleLine: true,
maxUnitWidth: 100,
}).addTo(map);
and this is my browser-print-start event:
map.on("browser-print-start", function (e) {
L.control.graphicScale({
fill: 'hollow',
metric: true,
imperial: false,
position: 'bottomleft',
labelPlacement: 'bottom'
}).addTo(e.printMap);
});
thanks..
Hi.. I modified my browser-print-start event and works fine!!!
map.on("browser-print-start", function (e) {
var header = document.querySelector('.grid-print-container');
var link = document.createElement('link');
link.id = 'minhaclass';
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = '~/css/better-scale,css';
link.media = 'all';
header.appendChild(link);
L.control.graphicScale({
fill: 'hollow',
metric: true,
imperial: false,
position: 'bottomleft',
labelPlacement: 'bottom'
}).addTo(e.printMap);
});
If anybody needs this, this is a solution....
Hi!!
Please, I need your help!!! The printing of my maps must have the scale. Even after inserting this scale in the map by the event "browse-print-start", the css of the scales are not "sent" for printing. As a result, the scale appears, but without any style. This makes it very difficult to visualize the information. Do you have any idea how to do this ??