suerprisePlus
2024-06-21 fde8e3bedaf5f883f38c3a0ec33d3c6a8748d1c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import mapServer from "./mapServer";
 
const mapInfo = {
  init(res) {
    switch (res) {
      case "flyto-tool":
        this.setFlyToImageryLayer();
        break;
      case "addWeapons":
        this.setAddWeapons();
        break;
      case "EntityQueryInput":
        this.setEntityQueryInput();
        break;
    }
  },
  setFlyToImageryLayer() {
    mapServer.addServer({
      sourceType: "tms",
      url: "http://192.168.11.41:9001/gisserver/tmsserver/SubicBayArea"
    });
  },
  setAddWeapons() {
    mapServer.addServer({
      sourceType: "wfs",
      url: "https://cim.smartearth.cn/geoserver/PolygonFeature/ows",
      layer: "PolygonFeature:Weapon",
      outlineColor: "#ff0000",
      alpha: 0
    });
  },
  setEntityQueryInput(){
    earthCtrl.camera.flyTo(120.27012029869624, 14.794107005718674, 2921.642108119077, 0, -90, 0, 2);
    // earthCtrl.camera.flyTo(120.298738742, 14.80902903, 2921.642108119077, 0, -90, 0, 2);
  },
 
};
export default mapInfo;