OpenLayers6(3):Vue导出图片时报错“Uncaught DOMException: Failed to execute ‘toDataURL on ‘HTMLCanvasElement”
1.版本OpenLayers:6.4.32.导出时候遇到报错3.原因分析原因:openlayers中加载的图层中存在不允许跨域的图层;解决:找到相应的图层,添加crossOrigin:'anonymous',处理跨域问题;//切片-图层exportfunctionaddlocalTileLayer(title,url,proj='EPSG:3857'){consttileLayer=newTile