From 6ae4841b48665145aa469d574fbadb988a9c498c Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期四, 27 六月 2024 15:55:17 +0800 Subject: [PATCH] 演示1版本 --- src/assets/js/map/mapView.js | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/assets/js/map/mapView.js b/src/assets/js/map/mapView.js index 44cadf3..d397003 100644 --- a/src/assets/js/map/mapView.js +++ b/src/assets/js/map/mapView.js @@ -1,18 +1,42 @@ +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(); + // earthCtrl.factory.createTerrainLayer({sourceType: "ctb", + // url: 'https://tiles1.geovisearth.com/base/v1/terrain?token=486dac3bec56d7d7c2a581c150be2bd937462f1e8f3bc9c78b5658b396122405' + // }); + 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" + }); - }, - - - - - - -} -export default mapViewer; \ No newline at end of file + modelLayer.init(); + mapInfo.setEntityQueryInput(); + // const url = layerJson.getQueryUrl("SubicBayAreaVector_wfs", "GeoEntity"); + // layerJson.init(url); + } +}; +export default mapViewer; -- Gitblit v1.9.3