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

Custom print capability creates bigger area than the one defined by the rectangle #108

Closed AlbertoMCS closed 2 years ago

AlbertoMCS commented 2 years ago

Hi, Many thanks for this useful plugin. I noticed that when using the custom print capability, the area printed out is bigger than the area defined by the rectangle. Is there a way to get exactly the area defined by the rectangle. Cheers

Igor-Vladyka commented 2 years ago

Hey there.

Basically we print map with a specific zoom. When you use Custom mode we calculate appropriate zoom level for a map to fit all selected content -> scale the map to it -> print it so you see everything selected.

Due to raster map (tiles) specifics there is no way to print only what you have selected. You may need to use something else and/or vector map library for this. Right now vector layers not quite tested and not supported here.

Regards,