HarmonyOS 地图服务地点搜索失败?

错误信息

{"code":1002600003,"name":"Error","message":"App authentication failed."}

已配置权限:

ohos.permission.LOCATION

ohos.permission.APPROXIMATELY\_LOCATION

ohos.permission.LOCATION\_IN\_BACKGROUND

ohos.permission.INTERNET

async locationClick() {
  let params: site.NearbySearchParams = {
    query: "",
    location: {
      longitude: 120.263,
      latitude: 31.897
    },
    radius: 5000,
    language: "zh",
    pageIndex: 1,
    pageSize: 20
  };
  try {
    const result = await site.nearbySearch(params);
  } catch (e) {
    console.log('e', JSON.stringify(e))
  }
}
阅读 414
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
logo
HarmonyOS
子站问答
访问
宣传栏