|
@@ -100,7 +100,11 @@ import { keys } from "lodash";
|
|
|
import { handModel, handnew, clearTranslate, keyName } from "./modelLayering";
|
|
|
import CockpitVector from "./CockpitVector.vue";
|
|
|
import MultiLevelQuery from "./MultiLevelQuery.vue";
|
|
|
-import { loadGeoJSON, str2Unicode } from "@/utils/MapHelper/help.js";
|
|
|
+import {
|
|
|
+ loadGeoJSON,
|
|
|
+ removeGeoJSON,
|
|
|
+ str2Unicode,
|
|
|
+} from "@/utils/MapHelper/help.js";
|
|
|
import * as pick_cockpit_vector from "./pick_cockpit_vector.js";
|
|
|
import * as tdsy from "@/views/cockpit/js/tdsy";
|
|
|
import * as turf from "@turf/turf";
|
|
@@ -198,7 +202,7 @@ export default {
|
|
|
let obj = store.state.vectorlayerlist[i];
|
|
|
if (obj.id == val) {
|
|
|
if (obj.serverType == "geoserver") {
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
this.addGeoJson("#0000ff");
|
|
|
} else {
|
|
|
this.addGeometrys(obj.type == "S3M");
|
|
@@ -248,7 +252,7 @@ export default {
|
|
|
toggleVisibility() {
|
|
|
this.removeMapLayerQuery();
|
|
|
this.remove_query_click();
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
store.setToolBarAction(9);
|
|
|
tdsy.remove(false);
|
|
|
},
|
|
@@ -313,7 +317,7 @@ export default {
|
|
|
let cur = geoms[index];
|
|
|
if (cur) {
|
|
|
if (cur.type) {
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
loadGeoJSON(
|
|
|
cur,
|
|
|
"#ff0000",
|
|
@@ -342,10 +346,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
removeGeoJSON() {
|
|
|
- viewer.entities.removeAll();
|
|
|
- viewer.dataSources._dataSources.forEach((das) => {
|
|
|
- if (das.name == "geoserver") viewer.dataSources.remove(das);
|
|
|
- });
|
|
|
+ // viewer.entities.removeAll();
|
|
|
+ // viewer.dataSources._dataSources.forEach((das) => {
|
|
|
+ // if (das.name == "geoserver") viewer.dataSources.remove(das);
|
|
|
+ // });
|
|
|
},
|
|
|
flyToSuperMap(cur) {
|
|
|
dataSourceLayer.entities.removeAll();
|
|
@@ -401,7 +405,7 @@ export default {
|
|
|
let scene = viewer.scene;
|
|
|
viewer.entities.removeAll();
|
|
|
dataSourceLayer.entities.removeAll();
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
//拾取模型
|
|
|
let pickedFeature = scene.pick(movement.position);
|
|
|
if (
|
|
@@ -422,7 +426,7 @@ export default {
|
|
|
"realspace",
|
|
|
"data/featureResults.rjson?returnContent=true"
|
|
|
);
|
|
|
-
|
|
|
+
|
|
|
// this.drawPolygon(window.tempSelect)
|
|
|
// //拾取模型
|
|
|
// let pickedFeature = viewer.scene.pick(movement.position);
|
|
@@ -753,7 +757,7 @@ export default {
|
|
|
this.layersData = [];
|
|
|
viewer.entities.removeAll();
|
|
|
dataSourceLayer.entities.removeAll();
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
let title;
|
|
|
if (store.state.checkedData) title = store.state.checkedData.title;
|
|
|
// 超图分层分户
|
|
@@ -846,7 +850,7 @@ export default {
|
|
|
this.handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
|
}
|
|
|
dataSourceLayer.entities.removeAll();
|
|
|
- this.removeGeoJSON();
|
|
|
+ removeGeoJSON("geoserver");
|
|
|
viewer.dataSources.remove(dataSourceLayer);
|
|
|
},
|
|
|
/**
|
|
@@ -968,6 +972,7 @@ export default {
|
|
|
});
|
|
|
points += res.positions[0] + ",";
|
|
|
points += res.positions[1] + " ";
|
|
|
+ console.log(res.positions, points);
|
|
|
this.getGeoserver({ points }, obj);
|
|
|
} else {
|
|
|
// if (!obj.fwgzkj && !obj.fwmc) {
|