Skip to content

Commit

Permalink
fix: 修改 LocationSearch 高德 key 值
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqianci committed May 6, 2024
1 parent f9fb23c commit f7b9964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/components/LocationSearch/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 1 addition & 2 deletions src/components/LocationSearch/demos/default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down Expand Up @@ -45,7 +44,7 @@ export default () => {
<CustomControl position="topleft">
<LocationSearch
searchParams={{
key: AMAP_KEY_LIST[Math.floor(Math.random() * AMAP_KEY_LIST.length)],
key: 'b93400c020206bd6865a075036e7f423',
location,
}}
autoFocus
Expand Down

0 comments on commit f7b9964

Please sign in to comment.