From fde8e3bedaf5f883f38c3a0ec33d3c6a8748d1c9 Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期五, 21 六月 2024 18:02:44 +0800 Subject: [PATCH] wfs 范围查询 --- src/assets/js/map/mapInfo.js | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/assets/js/map/mapInfo.js b/src/assets/js/map/mapInfo.js index 66a6453..eede9a4 100644 --- a/src/assets/js/map/mapInfo.js +++ b/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; -- Gitblit v1.9.3