suerprisePlus
2024-06-21 fde8e3bedaf5f883f38c3a0ec33d3c6a8748d1c9
src/assets/js/map/mapInfo.js
@@ -3,16 +3,36 @@
const mapInfo = {
  init(res) {
    switch (res) {
      case "flyToImageryLayer":
      case "flyto-tool":
        this.setFlyToImageryLayer();
        break;
      case "addWeapons":
        this.setAddWeapons();
        break;
      case "EntityQueryInput":
        this.setEntityQueryInput();
        break;
    }
  },
  setFlyToImageryLayer() {
    mapServer.addServer({
      sourceType: "tms",
      url: "http://test.smartearth.cn:9037/gisserver/tmsserver/SubicBayArea"
      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;