boundaryDownloadFile({ type: 1 }).then(res => {
var reader = new FileReader();
reader.readAsText(res);
reader.onload = function () {
if (this.readyState === 2) {
let result = JSON.parse(this.result);
MapBoxService.drawRoadLine(result, this.mapBoxMap, 'device-roadline');
}
}
});
后端接口返回文件流,前端解析成数据使用
最新推荐文章于 2024-06-13 10:06:49 发布