这是以前的图片下载代码 map.once('postcompose', function (event) { var canvas = event.context.canvas; if (navigator.msSaveBlob) { navigator.msSaveBlob(canvas.msToBlob(), 'map.png'); } else { canvas.toBlob(function (blob) { saveAs(blob, 'map.png'); }); } }); map.renderSync();
下载地图一般采用的都是插件,您可以参考一下https://www.cnblogs.com/giserhome/p/12590932.html