example/app.js
function downloadImage(map) {
    map.exportAsImage(function (url) {
        let a = document.createElement("a");
        a.download = "example";
        a.href = url;
        a.click();
    }, "jpeg");
}
function downloadImage(map) {
    map.exportAsImage(function (url) {
        let a = document.createElement("a");
        a.download = "example";
        a.href = url;
        a.click();
    }, "jpeg");
}
function downloadImage ( map ) { map . exportAsImage ( function ( url ) { let a = document . createElement ( "a" ) ; a . download = "example" ; a . href = url ; a . click ( ) ; } , "jpeg" ) ; }
Save the image of the map
Save the image of the map