Closed ghost closed 5 years ago
Hi there. I just tried your site in Chrome browser and it works well. With all colors :)
THe point with printing is I create overlay as last child of BODY, so non the of CSS that is relative will work. You need to have clear .class to highlight your background for scale control.
Please let me know if you need any other help.
i 've set the control scale css
.leaflet-control.scale{
background:#66ccff;
}
</style>
the #66ccff works in manualMode, but have no effects when i click the [print] button .
could u tell me the way to hignlight my control or,the progress of adding child to overla ?
does
L.legendControl({position: 'bottomright'}).addTo(e.printMap);
with the css above take an effect?
grateful
han
hello lgor! when i print my map with a scale control ,it works well in (please copy it to browser url for visit) hancc.xyz but when i deploy the plugin in my own project built with vue ,troubles came and i could find the key to solve it, could u give me a hand ? thanks! the code below i used both in the two demo, set the BrowserPrint options [manualMode:true] and see what happens in printed page.
when i push the 'print' button i shoud get the pdf like :
in face it is like:
the css is removed , and the words (100KM and 50mi) in the scale control can be selected like other words in html. actually, all the css will be eliminated when i push [print] button..
thanks a lot!
han
L.control.browserPrint({//etc... manualMode: true}); L.control.scale({position:'topleft'}).addTo(map);
the printing progress : css(the white background) works in manualMode:true printing page: