Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate screenshot of map

How can I generate a image of a div, the div contain a map of leaflet (base layers, overlays)?

Screenshot_Leaflet_Div

like image 801
Kenyo Joel Avatar asked Nov 09 '22 03:11

Kenyo Joel


1 Answers

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.

like image 160
snkashis Avatar answered Jan 04 '23 01:01

snkashis