共计 648 个字符,预计需要花费 2 分钟才能阅读完成。
async resultrender(val) {
let that = this;
// 通过接口获取 tif 文件门路
let resdatas = await getTifUrlByName({name: val.title});
const Geoprocessor = await arcgisPackage.Geoprocessor;
let gp = new Geoprocessor(resdatas.data.data.mapId);
var params = {inputPath: resdatas.data.data.tifPath,};
gp.submitJob(params)
.then((res) => {gp.waitForJobCompletion(res.jobId).then(() => {
// 间接获取拿取 layer
let layers = gp.getResultMapImageLayer(res.jobId);
layers.then((layer) => {
// 后果集
this.$message.success("已胜利加载图层");
this.map.add(layer);
this.NowLayers = layer;
that.tableDatas.td = [];
that.tableDatas.td = [
...that.dealEvaluationResults(JSON.parse(resdatas.data.data.result)
),
];
});
});
})
.catch((err) => {console.log(err);
});
},
正文完