From 28bc3f27ebf716a9e85950f1b18d201baac58647 Mon Sep 17 00:00:00 2001 From: tangshaojian <63377964@qq.com> Date: Fri, 25 Apr 2025 09:12:14 +0800 Subject: [PATCH] =?UTF-8?q?tsj:=20CooglMap=20js=E4=BF=AE=E6=94=B9search?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=82=B9=E4=BD=8D=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E5=A2=9E=E5=8A=A0token=EF=BC=9BCoog?= =?UTF-8?q?lMap=E5=9C=B0=E5=9B=BE=E9=A6=96=E9=A1=B5=E6=89=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BAcqi=EF=BC=9B=E8=A6=81=E6=98=BE=E7=A4=BA=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E5=BA=95=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapContainer/DistrictMapCustomized/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/index.tsx b/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/index.tsx index 163feec8..0025d944 100644 --- a/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/index.tsx +++ b/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/index.tsx @@ -30,7 +30,6 @@ import { useDashboard } from '../../context'; // import { CooglLoadArea } from './loadAreaNew'; // import { CooglLoadArea } from './loadArea-1.3.1'; import { CooglLoadArea } from './loadArea-1.4.0'; -import AreaSelector from '../AreaSelector'; export const colorConfig: Record< string, @@ -414,7 +413,8 @@ const DistrictMapCustomized: React.FC = ({ onMapInst try { // 初始化CooglLoadArea console.log('[CooglMapDemo] 开始初始化CooglLoadArea', MapRef.current); - let instance = new CooglLoadArea(viewer); + let token = '24e46ea5-73df-4c84-93b1-7513a2507f8f'; + let instance = new CooglLoadArea(viewer, token); // 设置实例参数 instance.params = { @@ -460,7 +460,7 @@ const DistrictMapCustomized: React.FC = ({ onMapInst zoom={8} ref={MapRef} center={{ x: 103.96, y: 30.658842 }} - showOriginMap={false} + // showOriginMap={false} customInitCallback={(viewer: any) => initLoadCooglMapArea(viewer)} changeSize={{ x1: 908, y1: 430, x2: 908, y2: 572 }} > @@ -468,7 +468,7 @@ const DistrictMapCustomized: React.FC = ({ onMapInst <> {/**区域 */} {/* {memoizedPolygons} */} - {data?.map((item, index) => { + {isHomePage && data?.map((item, index) => { const point = [Number(item.centerX), Number(item.centerY)]; return ( -- GitLab