rowanwins / leaflet-easyPrint

A leaflet plugin which adds an icon to print the map - Demo @ http://rowanwins.github.io/leaflet-easyPrint/
MIT License
249 stars 138 forks source link

Only current size works #81

Open tapiamcclung opened 6 years ago

tapiamcclung commented 6 years ago

Hi! Great plugin. Thanks! In my implementation, however, I am able to only export using current size when using leaflet 0.7.7. Neither A4s or an additional option I set up works. Tried using Chrome 67, FF 61, different tiles, adding tileWait to the options and I get the same behavior: a blank page and a console error:

TypeError: e.options.tileLayer.isLoading is not a function and the offending function is _pausePrint

If I use leaflet 1.0.3 then I can export to different sizes but Current Size sometimes creates a large transparent image with the map being small...

Any clues? Thanks!

vmagalhaes commented 6 years ago

+1

cobbBR commented 6 years ago

The demo works perfectly on my machine. However, when I add it to my map I can only get the current size to download. Both A4 Portrait and Landscape give the same TypeError. I am using leaflet 1.0.3

UPDATE: I was able to get it working by removing the tileLayer option and leaving it set to null