From 81f92eb9fb83ed5d8ac0b0a5c206315416f10df0 Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期四, 04 七月 2024 10:14:06 +0800 Subject: [PATCH] 系统更新 --- src/assets/js/map/mapInfo.js | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/assets/js/map/mapInfo.js b/src/assets/js/map/mapInfo.js index 66a6453..9a70af3 100644 --- a/src/assets/js/map/mapInfo.js +++ b/src/assets/js/map/mapInfo.js @@ -3,16 +3,50 @@ 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://103.135.160.14:9038/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); + earthCtrl.camera.flyTo( + 120.25011537497547, + 14.785109412061856, + 2921.642108119077, + 57, -45, 0, 2 + ); + }, + setFlyTo(res){ + earthCtrl.camera.flyTo( + res.longitude, + res.latitude, + res.height, + 0, -90, 0, 2 + ); } + }; export default mapInfo; -- Gitblit v1.9.3