From c776c1d733134d4901fa19c601c9aa92921ad6f3 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 10 Oct 2023 09:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=B0=E5=9B=BE=E6=8F=8F?= =?UTF-8?q?=E7=82=B9=E7=82=B9=E5=87=BB=E8=BF=94=E5=9B=9E=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E4=B8=8E=E7=82=B9=E5=87=BB=E5=89=8D=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/AiDvRender.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/components/AiDvRender.vue b/components/AiDvRender.vue index cdb345b1..96e4bc6b 100644 --- a/components/AiDvRender.vue +++ b/components/AiDvRender.vue @@ -184,8 +184,9 @@ export default { if (AMap && map) { map.clearMap() const center = map.getCenter() + const zoom = map.getZoom() map.on('click', () => { - map.setZoomAndCenter(10, center) + map.setZoomAndCenter(zoom, center) map.setPitch(0) this.mapDialog = false }) @@ -212,20 +213,16 @@ export default { polylines.filter(e => e.path?.length > 0)?.map(e => new AMap.Polyline({ map, strokeColor: "#00FFAE", ...e, path: e.path.map(p => new AMap.LngLat(p[1], p[0])) })) + map.setFitView() this.data.is3d > 0 && map.setPitch(65) if (this.data.is3dAround == 1) { - this.timer = setInterval(() => map?.setRotation(360, false, 16000)) + this.timer = setInterval(() => map.setRotation(360, false, 16000)) } } else if (count < 10) { console.log("正在加载...%s", count) setTimeout(() => this.renderMap(++count), 1000) } } - }, - mounted() { - if (this.currentType == 'table') { - // this.$injectLib("https://cdn.cunwuyun.cn/datav.map.vue.js") - } } }