This shows how you can use html2canvas to produce a PNG image of your Leaflet map
JavaScript PHP
Switch branches/tags
Nothing to show
Latest commit 82b3655 Jul 13, 2013 @tegansnyder Merge pull request #2 from ankeshanand/master
Add Proxy Support. Thanks @ankeshanand
Failed to load latest commit information.
Leaflet/dist first commit May 18, 2012
ajax first commit May 18, 2012
js first commit May 18, 2012
README first commit May 18, 2012
index.html Add a proxy support to work with cross-origin images Jul 11, 2013
proxy.php Add proxy.php Jul 11, 2013


Saving a Leaflet Map to a PNG Example using Javascript and PHP

This is an example of taking a Leaflet map and saving it to a PNG.

To run the source example unzip the files into a directory on your webserver. 
Make sure to CHMOD the savedMaps directory 777.

Load it up in a web browser and click the "Save to PNG button". Give it a few seconds.


Many thanks to:

html2canvas by Niklas von Hertzen

Jamund Ferguson