How can I generate a image of a div, the div contain a map of leaflet (base layers, overlays)?
Mapbox's leaflet-image plugin will allow you to kick out an image file of your map container clientside.Enabling canvas mode is required, as seen in their instructions. A more involved server-side approach would include the use of Mapfish/Geoserver and a leaflet plugin, which has a lot more flexibility, but also a lot more configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With