From 25d930f19475c075d75a10799c7dde4421c31ee9 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 14 九月 2023 10:37:01 +0800 Subject: [PATCH] 图层管理,在线制图,地名定位修改 --- src/views/search/search.vue | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/views/search/search.vue b/src/views/search/search.vue index 546e6f9..2b9cec9 100644 --- a/src/views/search/search.vue +++ b/src/views/search/search.vue @@ -115,6 +115,7 @@ // import config from "../../../public/config/config.js"; import { dataQuery_selectByPage } from "@/api/api.js"; import { ElMessage } from "element-plus"; +import menuTool from "@/assets/js/Map/menuTool"; let searchValue = ref(""); const searchFLag = ref(false); const tableData = ref([]); @@ -129,25 +130,26 @@ const NumhandleChange = (value: number) => {}; const handleChange = (val: string[]) => {}; const setPoitCannel = () => { - if (imageLabel) { - imageLabel.deleteObject(); - imageLabel = null; - } + // if (imageLabel) { + // imageLabel.deleteObject(); + // imageLabel = null; + // } + menuTool.setClearLocation("鍦板悕瀹氫綅"); }; const setPointLocal = (res) => { - if (imageLabel) { - setPoitCannel(); - } + setPoitCannel(); + var position = { X: res.lon, Y: res.lat, Altitude: 10 }; - imageLabel = window.sgworld.Creator.CreateImageLabel( - position, - config.StaticFileBaseUrl + "/Workers/image/location.png", - {}, - 0, - "鏍囩鐐�" - ); - var id = imageLabel.item.id; - window.sgworld.Navigate.flyToObj(imageLabel.item); + menuTool.setLocationPoint([res.lon, res.lat], "鍦板悕瀹氫綅"); + // imageLabel = window.sgworld.Creator.CreateImageLabel( + // position, + // config.StaticFileBaseUrl + "/Workers/image/location.png", + // {}, + // 0, + // "鏍囩鐐�" + // ); + // var id = imageLabel.item.id; + // window.sgworld.Navigate.flyToObj(imageLabel.item); // window.earthCtrl.camera.flyTo(res.log, res.lat, 300, 9.5, -45, 0.0, 5); }; const setInputCahgne = () => { -- Gitblit v1.9.3