简体   繁体   English

单张打印不显示图钉并且地图已移动

[英]Leaflet printing does not show pins and map is shifted

I don't exactly why but whenever I try to print my leaflet map with layers, it shows the map a little shifted to the left as well as the pins are not quite ok. 我不知道为什么,但是每当我尝试打印带有图层的传单地图时,它都会显示地图向左移动一点,并且图钉也不是很好。 I tried using easyPrint() and window.print() , same result. 我尝试使用easyPrint()window.print() ,结果相同。 It used to work well. 过去效果很好。 Any ideas? 有任何想法吗? Here is the difference 这是区别

它应该看起来如何

when it opens up to print the map 当它打开以打印地图时 看起来如何

Using easyprint, (I am importing easyprint's css) 使用easyprint,(我正在导入easyprint的CSS)

jQuery.print.js:125 
 GET http://127.0.0.1:8001/proj/easyPrint.css  
 $.print.$.fn.print @ jQuery.print.js:125
 (anonymous function) @ VM4317:1

You need to edit the Easyprint.css . 您需要编辑Easyprint.css

Remove this line: 删除此行:

.leaflet-control-easyPrint-button{display: none!important;}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM