|
@@ -106,7 +106,7 @@ import * as turf from "@turf/turf";
|
|
|
let gwtype;
|
|
|
let query_click = null;
|
|
|
let manager_layer_png = null;
|
|
|
-
|
|
|
+let dataSourceLayer =null
|
|
|
export default {
|
|
|
name: "clickQuery",
|
|
|
components: { CockpitVector, MultiLevelQuery },
|
|
@@ -136,7 +136,7 @@ export default {
|
|
|
queryResultsGeom: {},
|
|
|
queryResultsGeomPart: {},
|
|
|
viewer: null,
|
|
|
- dataSourceLayer: null,
|
|
|
+ // dataSourceLayer: null,
|
|
|
actionOptions: [
|
|
|
{
|
|
|
index: 1,
|
|
@@ -203,10 +203,10 @@ export default {
|
|
|
if (!this.inited) {
|
|
|
this.inited = !this.inited;
|
|
|
this.viewer = viewer;
|
|
|
- this.viewer.entities.removeAll();
|
|
|
+ viewer.entities.removeAll();
|
|
|
this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
- this.dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
- this.viewer.dataSources.add(this.dataSourceLayer);
|
|
|
+ dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
+ this.viewer.dataSources.add(dataSourceLayer);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -245,7 +245,7 @@ export default {
|
|
|
},
|
|
|
addGeometrys(fill) {
|
|
|
this.viewer.entities.removeAll();
|
|
|
- this.dataSourceLayer.entities.removeAll();
|
|
|
+ dataSourceLayer.entities.removeAll();
|
|
|
let geoms = this.queryResultsGeom[this.activeLayerId];
|
|
|
let parts = this.queryResultsGeomPart[this.activeLayerId];
|
|
|
for (let i = 0; i < geoms.length; i++) {
|
|
@@ -300,7 +300,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
flyTo(index) {
|
|
|
- this.dataSourceLayer.entities.removeAll();
|
|
|
+ dataSourceLayer.entities.removeAll();
|
|
|
let geoms = this.queryResultsGeom[this.activeLayerId];
|
|
|
let parts = this.queryResultsGeomPart[this.activeLayerId];
|
|
|
let cur = geoms[index];
|
|
@@ -320,7 +320,7 @@ export default {
|
|
|
points.push(cx);
|
|
|
points.push(cy);
|
|
|
}
|
|
|
- // let e = this.dataSourceLayer.entities.
|
|
|
+ // let e = dataSourceLayer.entities.
|
|
|
let e = this.viewer.entities.add({
|
|
|
polyline: new Cesium.PolylineGraphics({
|
|
|
positions: Cesium.Cartesian3.fromDegreesArray(points),
|
|
@@ -343,8 +343,8 @@ export default {
|
|
|
},
|
|
|
// 设置数据
|
|
|
setData() {
|
|
|
- this.dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
- this.viewer.dataSources.add(this.dataSourceLayer);
|
|
|
+ dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
+ this.viewer.dataSources.add(dataSourceLayer);
|
|
|
this.activeLayerId = "0";
|
|
|
this.queryResults = {};
|
|
|
this.queryResultsGeom = {};
|
|
@@ -667,7 +667,7 @@ export default {
|
|
|
this.layerList = [];
|
|
|
this.layersData = [];
|
|
|
this.viewer.entities.removeAll();
|
|
|
- this.dataSourceLayer.entities.removeAll();
|
|
|
+ dataSourceLayer.entities.removeAll();
|
|
|
let title;
|
|
|
if (store.state.checkedData) title = store.state.checkedData.title;
|
|
|
// 超图分层分户
|
|
@@ -757,8 +757,8 @@ export default {
|
|
|
this.viewer.entities.removeAll();
|
|
|
this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
|
this.handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
|
- this.dataSourceLayer.entities.removeAll();
|
|
|
- this.viewer.dataSources.remove(this.dataSourceLayer);
|
|
|
+ dataSourceLayer.entities.removeAll();
|
|
|
+ this.viewer.dataSources.remove(dataSourceLayer);
|
|
|
},
|
|
|
/**
|
|
|
* 笛卡尔坐标系转WGS84坐标系(经纬度)
|