Igor-Vladyka / leaflet.browser.print

A leaflet plugin which allows users to print the map directly from the browser
https://igor-vladyka.github.io/leaflet.browser.print/
MIT License
154 stars 76 forks source link

when print type is auto ,some may have mistake #93

Closed fishergisdldt closed 3 years ago

fishergisdldt commented 3 years ago

when map has no visiualLayers,print type is auto may cause mistake in file leaflet.browser.print.js line 350

if (!fitBounds) { fitBounds = this._map.getBounds(); } return fitBounds;

change to: if (!fitBounds ||fitBounds._southWest==undefined) { fitBounds = this._map.getBounds(); } return fitBounds;

Igor-Vladyka commented 3 years ago

Hello. There should be no use cases when map has no visual layers :) But I will add check for it, thanks.

Igor-Vladyka commented 3 years ago

Added fix in latest version.