一般手机软件有的都会有开启地图功能,这里说一下怎么开启地图服务
1、 首先你需要配置一些东西,在华为的agc平台上,下边链接就是详细的教程
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/map-config-agc-V5
我说一下你自己需要在ide上做的,
有三个证书,这个需要你从华为官方上下载好的,就是上边链接告诉你要做的一个p12,一个p7b,一个cer,你需要在项目里设置一下
在module.json5里你需要申请地图权
’requestPermissions‘:[
{
“name”: ‘ohos.permission.LOCATION’,
‘reason’: ‘KaTeX parse error: Expected 'EOF', got '}' at position 139: … } }̲, { …string:GPSReason’,
‘usedScene’: {
“abilities”: [
‘EntryAbility’
],“when”: ‘inuse’
}
}
]
然后再entryablity里去把权限申请好
let manager= abilityAccessCtrl.createAtManager()
await manager.requestPermissionsFromUser(this.context,[