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))
  }
}
阅读 413
1 个回答
logo
HarmonyOS
子站问答
访问
宣传栏