|
@@ -116,6 +116,7 @@ import { GetXzjg } from "../../../api/ghss/ghxz.js";
|
|
|
// 使用
|
|
|
import parse from "wellknown";
|
|
|
import data from "../../../../static/data/ghss/data";
|
|
|
+let dataSources = {}
|
|
|
export default {
|
|
|
components: {},
|
|
|
props: {
|
|
@@ -157,7 +158,6 @@ export default {
|
|
|
tempObj: null,
|
|
|
copyData: null,
|
|
|
arrww: [],
|
|
|
- dataSources: {},
|
|
|
tempdataSourcesId: null,
|
|
|
xzjgBSM: "",
|
|
|
};
|
|
@@ -266,7 +266,7 @@ export default {
|
|
|
});
|
|
|
if (id) {
|
|
|
this.tempdataSourcesId = id;
|
|
|
- _this.dataSources[id] = dataSource;
|
|
|
+ dataSources[id] = dataSource;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -306,10 +306,7 @@ export default {
|
|
|
this.bgList = [];
|
|
|
},
|
|
|
mapview(item) {
|
|
|
- console.log(item);
|
|
|
- // if (this.dataSources[item.dkbm]) {
|
|
|
- // viewer.dataSources.remove(this.dataSources[item.dkbm);
|
|
|
- // }
|
|
|
+ console.log(item)
|
|
|
this.drawWktPloygon(item.geom, "#ff0000", item.dkbm);
|
|
|
},
|
|
|
|
|
@@ -350,7 +347,7 @@ export default {
|
|
|
//监听区域id的变化,用于删除上一次点击生成的geojson区域面
|
|
|
tempdataSourcesId(newVal, oldVal) {
|
|
|
if (oldVal) {
|
|
|
- viewer.dataSources.remove(this.dataSources[oldVal]);
|
|
|
+ viewer.dataSources.remove(dataSources[oldVal]);
|
|
|
}
|
|
|
},
|
|
|
},
|