我正在使用插件传单浏览器打印,有一个问题,当我点击打印时,我想在打印中显示比例,但我根本不能这样做。即使您完全按照示例(https://github.com/Igor-Vladyka/leaflet.browser.print)中所示进行了配置,它也不会出现。
我的代码是基本的:
// PRINT
ctlPrint = L.browserPrint({
closePopupsOnPrint: false,
printModesNames: {Portrait:"Retrato", Landscape:"Paisagem", Auto:"Auto", Custom:"Selecione a área"}
}).addTo(map);
map.on("browser-print-start", function(e){
L.control.scale({
position: 'topleft',
imperial: false,
maxWidth: 200
}).addTo(e.printMap);
});就是这样!根据代码,比例应显示在顶部和左侧,在打印前的预览中,它实际上显示了比例,但当它打印时没有。谁来帮帮我?谢谢!我的代码在这里:https://github.com/eltonsantos/mapasFortaleza/blob/master/js/script.js
https://stackoverflow.com/questions/47653070
复制相似问题