From f9fb23c02e69f50ef54fe8e423164e08c708b4b7 Mon Sep 17 00:00:00 2001 From: zhaoqianci Date: Mon, 6 May 2024 10:34:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20LocationSearch?= =?UTF-8?q?=20=E9=AB=98=E5=BE=B7=20key=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LocationSearch/constant.ts | 7 +++++++ src/components/LocationSearch/demos/default.tsx | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/LocationSearch/constant.ts b/src/components/LocationSearch/constant.ts index 6dc8a067..9de836c5 100644 --- a/src/components/LocationSearch/constant.ts +++ b/src/components/LocationSearch/constant.ts @@ -2,3 +2,10 @@ export const CLS_PREFIX = 'larkmap-location-search'; export const GAO_DE_API_URL = 'https://restapi.amap.com/v3/assistant/inputtips'; + +export const AMAP_KEY_LIST = [ + 'b93400c020206bd6865a075036e7f423', + '20a5ed5ecb2756a0361e83e794b4aa0a', + 'fdd01f9a9dd6846239b9523d7923339b', + '053b838db2f7b6a871b6ec5dbf62ab62', +]; diff --git a/src/components/LocationSearch/demos/default.tsx b/src/components/LocationSearch/demos/default.tsx index 09cccb6b..d88a4740 100644 --- a/src/components/LocationSearch/demos/default.tsx +++ b/src/components/LocationSearch/demos/default.tsx @@ -3,6 +3,7 @@ import type { LocationSearchOption } from '@antv/larkmap'; import { CustomControl, LarkMap, LocationSearch } from '@antv/larkmap'; import { message } from 'antd'; import React, { useCallback, useEffect, useState } from 'react'; +import { AMAP_KEY_LIST } from '../constant'; export default () => { const [location, setLocation] = useState(''); @@ -44,7 +45,7 @@ export default () => { Date: Mon, 6 May 2024 10:38:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20LocationSearch?= =?UTF-8?q?=20=E9=AB=98=E5=BE=B7=20key=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LocationSearch/constant.ts | 3 +-- src/components/LocationSearch/demos/default.tsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/LocationSearch/constant.ts b/src/components/LocationSearch/constant.ts index 9de836c5..0dab8924 100644 --- a/src/components/LocationSearch/constant.ts +++ b/src/components/LocationSearch/constant.ts @@ -3,8 +3,7 @@ export const CLS_PREFIX = 'larkmap-location-search'; export const GAO_DE_API_URL = 'https://restapi.amap.com/v3/assistant/inputtips'; -export const AMAP_KEY_LIST = [ - 'b93400c020206bd6865a075036e7f423', +export const AMAP_AVAILABLE_KEY_LIST = [ '20a5ed5ecb2756a0361e83e794b4aa0a', 'fdd01f9a9dd6846239b9523d7923339b', '053b838db2f7b6a871b6ec5dbf62ab62', diff --git a/src/components/LocationSearch/demos/default.tsx b/src/components/LocationSearch/demos/default.tsx index d88a4740..165750b2 100644 --- a/src/components/LocationSearch/demos/default.tsx +++ b/src/components/LocationSearch/demos/default.tsx @@ -3,7 +3,6 @@ import type { LocationSearchOption } from '@antv/larkmap'; import { CustomControl, LarkMap, LocationSearch } from '@antv/larkmap'; import { message } from 'antd'; import React, { useCallback, useEffect, useState } from 'react'; -import { AMAP_KEY_LIST } from '../constant'; export default () => { const [location, setLocation] = useState(''); @@ -45,7 +44,7 @@ export default () => { Date: Mon, 6 May 2024 10:40:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20LocationSearch?= =?UTF-8?q?=20=E9=AB=98=E5=BE=B7=20key=20=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LocationSearch/constant.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/LocationSearch/constant.ts b/src/components/LocationSearch/constant.ts index 0dab8924..6dc8a067 100644 --- a/src/components/LocationSearch/constant.ts +++ b/src/components/LocationSearch/constant.ts @@ -2,9 +2,3 @@ export const CLS_PREFIX = 'larkmap-location-search'; export const GAO_DE_API_URL = 'https://restapi.amap.com/v3/assistant/inputtips'; - -export const AMAP_AVAILABLE_KEY_LIST = [ - '20a5ed5ecb2756a0361e83e794b4aa0a', - 'fdd01f9a9dd6846239b9523d7923339b', - '053b838db2f7b6a871b6ec5dbf62ab62', -];