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
155 stars 76 forks source link

Cluster marker not shown correctly #90

Closed johan14 closed 4 years ago

johan14 commented 4 years ago

The bug

Hello Igor, When printing a map with two markers not grouped into a marker cluster, it seems that both the markers and the cluster icon will be printed. The mode I've used is L.control.browserPrint.mode(L.Control.BrowserPrint.Mode.Landscape, null, null, null, true)

Expected behavior When printing a map with markers not in a cluster, they should be printed separated.

Screenshots This is the state of map before printing.

image

This is the printed map.

image

Maybe this happens because at printing, the map zooms out a little and the cluster icon is activated. Can you help me on how to display only the cluster icon, or only the markers, but not both? Thank you, Johan

Igor-Vladyka commented 4 years ago

Hi there.

Please try solution described here: markerclustergroup

Regards, Igor

johan14 commented 4 years ago

Thanks Igor, it worked.