From c12d35cb9899eaa68d3f5d38e904f0fb813cb669 Mon Sep 17 00:00:00 2001 From: ding_chengjie Date: Sat, 13 Sep 2025 11:37:49 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#ICXTHO]=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0amap-geoloacation=E7=BB=84=E4=BB=B6=E8=8E=B7=E5=8F=96a?= =?UTF-8?q?pikey=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-amap-geolocation.md | 16 ++++++++++++++++ zh-cn/react-native-amap-geolocation.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/en/react-native-amap-geolocation.md b/en/react-native-amap-geolocation.md index ef6561e0..3cb3d7df 100644 --- a/en/react-native-amap-geolocation.md +++ b/en/react-native-amap-geolocation.md @@ -272,6 +272,22 @@ render() { export default AmapGeoLocationDemo; ``` +## Usage Notes + +There are several important points to note when using this library: + +1. **Provide a valid AMap API key** + + **How to obtain the API key:** + + - Go to the official AMap link: [My Applications | AMap Console](https://console.amap.com/dev/key/app) + - Refer to the guide [Getting Started - HarmonyOS NEXT Map SDK | AMap API](https://lbs.amap.com/api/harmonyosnext-map3d-sdk/gettingstarted#t2) to obtain the appid. + - Create a new application in the console and click "Add Key." After generating the key, integrate it into your project. + +2. **Enable device network services** + +3. **Enable device location services** + ## Use Codegen This repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). diff --git a/zh-cn/react-native-amap-geolocation.md b/zh-cn/react-native-amap-geolocation.md index 58aa7f9f..c74a2792 100644 --- a/zh-cn/react-native-amap-geolocation.md +++ b/zh-cn/react-native-amap-geolocation.md @@ -272,6 +272,22 @@ render() { export default AmapGeoLocationDemo; ``` +## 使用注意事项 + +该库使用需要注意以下几点: + +1. 传入正确的高德地图apikey + + 具体获取方式: + + - 进入高德地图官方链接:[我的应用 | 高德控制台](https://console.amap.com/dev/key/app) + - 参考链接[入门指南-HarmonyOS NEXT 地图SDK | 高德地图API](https://lbs.amap.com/api/harmonyosnext-map3d-sdk/gettingstarted#t2)获取appid + - 在控制台创建新应用,点击添加key。生成key之后将key传进自己的业务中 + +2. 开启设备网络服务 + +3. 开启设备位置服务 + ## 使用 Codegen 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 -- Gitee