Additional methods to L.map class provides export and print maps
The following methods are added to the class:
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:
afterRender(canvas) {
operators...;
return canvas;
}
afterExport(dataURL) {
operators...;
return dataURL;
}
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.
Method exportDownload() calls the method export() to form the map image prints the image.
Methods options consistent
with the options the of method export().