suerprisePlus
2024-06-25 c93d4b3af5739f786cfdf20b16b28ec60403f709
src/assets/js/map/mapView.js
@@ -1,18 +1,39 @@
import axios from "axios";
import mapConfig from "./mapConfig";
import mapServer from "./mapServer";
import modelLayer from "./modelLayer";
import wfsConfig from "./wfsConfig";
import mapInfo from "./mapInfo";
import layerJson from "./mapJsonLayer";
const mapViewer = {
  configTooles: null,
  initMap() {
       var earthCtrl = new SmartEarth.EarthCtrl("cesiumContainer", {
            StaticFileBaseUrl: config.StaticFileBaseUrl,
        });
  },
  setMapLocaTion(res) {
  },
    window.earthCtrl = new SmartEarth.EarthCtrl("sdkContainer", {
      // 隐藏默认底图
      defaultImagery: false,
      // 隐藏logo
      printLog: false
      // sceneMode: SmartEarth.Cesium.SceneMode.SCENE2D
    });
    window.Cesium = SmartEarth.Cesium;
    window.Viewer = earthCtrl.viewer;
    Viewer.scene.globe.baseColor = Cesium.Color.fromCssColorString("#A9A9A9"); //设置地球颜色
    // 清空默认底图
    Viewer.imageryLayers.removeAll();
}
export default mapViewer;
    mapServer.addServer({
      sourceType: "arcgis",
      url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
    });
    mapServer.addServer({
      sourceType: "tms",
      url: "http://192.168.11.41:9001/gisserver/tmsserver/SubicBayArea"
    });
    modelLayer.init();
    mapInfo.setEntityQueryInput();
    // const url = layerJson.getQueryUrl("SubicBayAreaVector_wfs", "GeoEntity");
    // layerJson.init(url);
  }
};
export default mapViewer;