example/app.js
function downloadMap(map) {
    let data = map.exportAsJSON(),
        json = JSON.stringify(data),
        blob = new Blob([json], {type: "application/json"}),
        a = document.createElement("a");

    a.download = "example.json";
    a.href = URL.createObjectURL(blob);
    a.click();
}
function downloadMap(map) {
    let data = map.exportAsJSON(),
        json = JSON.stringify(data),
        blob = new Blob([json], {type: "application/json"}),
        a = document.createElement("a");

    a.download = "example.json";
    a.href = URL.createObjectURL(blob);
    a.click();
}
function downloadMap ( map ) { let data = map . exportAsJSON ( ) , json = JSON . stringify ( data ) , blob = new Blob ( [ json ] , { type : "application/json" } ) , a = document . createElement ( "a" ) ; a . download = "example.json" ; a . href = URL . createObjectURL ( blob ) ; a . click ( ) ; }
Download the json of the map
Download the json of the map