From aebf16936c7b7c35191693092634239ef4d817c4 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 7 Apr 2023 09:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E9=87=8F=E9=97=AD=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/packages/tools/AiTMap.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/packages/tools/AiTMap.vue b/ui/packages/tools/AiTMap.vue index 9591fe80..95db0d39 100644 --- a/ui/packages/tools/AiTMap.vue +++ b/ui/packages/tools/AiTMap.vue @@ -65,6 +65,7 @@ export default { document.body.appendChild(script); }, initTMap() { + const TMap = window?.TMap this.mapLib = TMap this.tmap = new TMap.Map(this.$refs.tmap, { zoom: 11, @@ -76,7 +77,7 @@ export default { this.areaId && this.getMapArea() }, getMapArea() { - let {mapLib, areaId, tmap: map} = this, keyword = areaId.substring(0, 6) + let {mapLib: TMap, areaId, tmap: map} = this, keyword = areaId.substring(0, 6) const fitBounds = (latLngList) => { // 由多边形顶点坐标数组计算能完整呈现该多边形的最小矩形范围 if (latLngList.length === 0) { @@ -98,7 +99,7 @@ export default { ); } let polygons = new TMap.MultiPolygon({map, geometries: []}); - new mapLib.service.District({ + new TMap.service.District({ polygon: 2, maxOffset: 100 }).search({keyword}).then(res => {