From 1e25ed347d7a0e21a8853f8c0a3bb7892edd1081 Mon Sep 17 00:00:00 2001 From: "taohebin@dcloud.io" Date: Fri, 25 Oct 2024 17:42:11 +0800 Subject: [PATCH] feat: docs/native/modules/android/uni-map-tencent.md --- docs/native/modules/android/others.md | 2 + .../native/modules/android/uni-map-tencent.md | 64 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 docs/native/modules/android/uni-map-tencent.md diff --git a/docs/native/modules/android/others.md b/docs/native/modules/android/others.md index f29086bc..ae6e1455 100644 --- a/docs/native/modules/android/others.md +++ b/docs/native/modules/android/others.md @@ -68,3 +68,5 @@ defaultConfig { [uni-verify](/native/modules/android/uni-verify.md) [uni-payment](/native/modules/android/uni-payment.md) + +[uni-map-tencent](/native/modules/android/uni-map-tencent.md) \ No newline at end of file diff --git a/docs/native/modules/android/uni-map-tencent.md b/docs/native/modules/android/uni-map-tencent.md new file mode 100644 index 00000000..5509d514 --- /dev/null +++ b/docs/native/modules/android/uni-map-tencent.md @@ -0,0 +1,64 @@ +## uni-map-tencent + + +### Gradle配置 + +首先需在项目根目录下的build.gradle增加仓库源 + +``` +allprojects { + repositories { + jcenter() + google() + maven{ + url "https://oss.sonatype.org/content/groups/public" + } + } +} +``` + +项目应用下的build.gradle + +``` + +android { + defaultConfig { + buildConfigField 'String', 'UTSEasyCom', '\"[{\\\"class\\\":\\\"uts.sdk.modules.DCloudUniMapTencent.UniMapTencentExtApiComponentsRegister\\\",\\\"method\\\":\\\"register\\\"}]\"' + } +} + +dependencies { + implementation 'com.tencent.map:tencent-map-vector-sdk:5.6.0' + implementation 'com.tencent.map:sdk-utilities:1.0.9' + implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.5.4.3' + implementation 'com.github.bumptech.glide:glide:4.16.0' +} +``` + +### 本地依赖库 + +|名称 |备注| +|:-- |:--| +|uni-map-tencent-release.aar || + +将本地依赖库复制到app项目的libs下。 + + +### AndroidManifest.xml配置 + +首先在腾讯位置服务官网申请api key, [文档](https://lbs.qq.com/mobile/androidMapSDK/developerGuide/getKey) + +在AndroidManifest.xml中添加api key,如下: + +``` + + + + + + + + +``` + + -- GitLab