帖子
帖子
用户
博客
课程
显示全部楼层
70
帖子
2
勋章
4060
Y币

[插件使用] bmLocation没有反应

[复制链接]
发表于 2023-10-11 16:22:34
使用bmLocation没有任何回调,已经按照文档在config文件里面配置好key:

  1. <feature name="bmLocation">

  2.                 <param name="ios_api_key" value="xxxxx"/>

  3.         </feature>

  4.         <meta-data name="com.baidu.lbsapi.API_KEY" value="xxxxxx"/>
复制代码
然后再文件中直接调用模块方法:
  1. let bmLocation = api.require('bmLocation');
  2.                 bmLocation.getPermissionState(function(ret) {
  3.                     console.log(JSON.stringify(ret));
  4.                 });
  5.                 console.log(333);
  6.                 bmLocation.singleLocation({
  7.                     reGeocode: false,
  8.                     netWorkState: false
  9.                 }, function(ret) {
  10.                     console.log(JSON.stringify(ret));
  11.                 });
  12.                 return;
复制代码
回调没有反应有什么原因造成的?
技术咨询-F
380
帖子
4
勋章
6
Y币
最佳答案
这个接口没调用呢? setAgreePrivacy 隐私合规接口 自原生插件 1.2.0后请务必同意该接口,否则该原生插件将不能正常使用,隐私政策可参考百度地图官网 setAgreePrivacy(callback(ret, err)) 示例代码 var bmLocation = api.require('bmLocation'); bmLocation.setAgreePrivacy({ agree:true }); 可用性 Android系统
380
帖子
4
勋章
6
Y币
这个接口没调用呢?

setAgreePrivacy
隐私合规接口

自原生插件 1.2.0后请务必同意该接口,否则该原生插件将不能正常使用,隐私政策可参考百度地图官网

setAgreePrivacy(callback(ret, err))

示例代码
var bmLocation = api.require('bmLocation');
bmLocation.setAgreePrivacy({
  agree:true
});
可用性
Android系统
您需要登录后才可以回帖 登录

本版积分规则