From 6069325e1a37cf0462afda1627d4c660735dc57e Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期二, 16 七月 2024 09:51:56 +0800 Subject: [PATCH] 版本更新 --- src/assets/js/map/mapView.js | 59 ++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/assets/js/map/mapView.js b/src/assets/js/map/mapView.js index 44cadf3..e162149 100644 --- a/src/assets/js/map/mapView.js +++ b/src/assets/js/map/mapView.js @@ -1,18 +1,47 @@ +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) { - - }, - - - - - - -} -export default mapViewer; \ No newline at end of file + 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(); + Viewer.scene.globe.depthTestAgainstTerrain = false; + earthCtrl.factory.createTerrainLayer({ + sourceType: "ctb", + url: "http://103.135.160.14:9038/gisserver/ctsserver/SubicBayDEM" + }); + mapServer.addServer({ + sourceType: "arcgis", + url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" + }); + mapServer.addServer({ + sourceType: "tms", + url: "http://103.135.160.14:9038/gisserver/tmsserver/SubicBayArea" + }); + const a = Viewer.clock.currentTime + let now2 = new Date(); + let todayNoon = new Date(now2.getFullYear(), now2.getMonth(), now2.getDate(), 12, 0, 0); + Viewer.clock.currentTime = Cesium.JulianDate.fromDate(todayNoon); + modelLayer.init(); + + // const url = layerJson.getQueryUrl("SubicBayAreaVector_wfs", "GeoEntity"); + // layerJson.init(url); + } +}; +export default mapViewer; -- Gitblit v1.9.3