Leaflet.Export

Demo

Additional methods to L.map class provides export and print maps

API

The following methods are added to the class:

export(exportOptions)

Method export create a map canvas or image in a specified format.
Returned value - promise.

The conversion process consists of two stages (steps in promise chain):

Options:

exportDownload(downloadOptions)

Method exportDownload() calls the method export() to form the map image and stores the image in the specified file.
In addition to the options of the method export(), method exportDownload() supports option fileName.

exportPrint(printOptions)

Method exportDownload() calls the method export() to form the map image prints the image.
Methods options consistent with the options the of method export().