帖子
帖子
用户
博客
课程
12下一页
返回列表 发新帖
显示全部楼层
4
帖子
0
勋章
49
Y币

[BUG] bMap cyclingNavi 无法打开

[复制链接]
发表于 2023-3-6 16:42:22
bMap 1.5.5 使用cyclingNavi 返回{"status":false}


bMap 1.5.3跟1.4.4 使用cyclingNavi 返回{"status":true},但应用闪退了。

现在导航还能怎么处理呢?尝试使用baiduNavigation也是一直无法正常打开
380
帖子
4
勋章
6
Y币
您好,先调用setAgreePrivacy  、 initMapSDK 接口了吗
4
帖子
0
勋章
49
Y币
技术咨询-F · 2023-3-6 16:52您好,先调用setAgreePrivacy  、 initMapSDK 接口了吗


      var map = api.require('bMap');
      map.setAgreePrivacy({
        agree: true
      });
      map.initMapSDK(function (ret) {
        if (ret.status) {
          initMap();
        }
      });
      function initMap() {
        // map.customStyle({customConfig:"lightblue"})
        let _self = this;
        map.open({
          rect: {
            x: 0,
            y: 0,
            w: api.frameWidth,
            h: api.frameHeight
          },
          center: {
            lon: 116.730058,
            lat: 23.387583
          },
          zoomLevel: 11,
          showUserLocation: true,
          fixedOn: api.frameName,
          fixed: true
        }, function (ret) {
          if (ret.status) {
            console.log('123456');
            // map.walkNavi({
            //   currentPosition: {
            //     latitude: 23.387583,    //纬度
            //     longitude: 116.730058    //经度
            //   },
            //   destination: {
            //     latitude: 23.397069,    //纬度
            //     longitude: 116.755642    //经度
            //   }
            // }, function (ret) {
            //   if (ret.status) {
            //     alert(JSON.stringify(ret));
            //   }
            // });
            map.cyclingNavi({
              currentPosition: {
                latitude: 23.387583,    //纬度
                longitude: 116.730058    //经度
              },
              destination: {
                latitude: 23.397069,    //纬度
                longitude: 116.755642    //经度
              }
            }, function (ret) {
              console.log(JSON.stringify(ret));
              if (ret.status) {
                alert(JSON.stringify(ret));
              }
            });
          }
        });
      }


您好,代码是这样的,1.5.5已经引用了setAgreePrivacy跟initMapSDK
380
帖子
4
勋章
6
Y币
BIP212703 · 2023-3-6 17:17var map = api.require('bMap');
      map.setAgreePrivacy({
        agree: true

不调open接口,直接调导航接口试试
4
帖子
0
勋章
49
Y币
技术咨询-F · 2023-3-6 17:34不调open接口,直接调导航接口试试

不开open确实{"status":true}了,但闪退了
380
帖子
4
勋章
6
Y币
BIP212703 · 2023-3-7 08:40不开open确实{"status":true}了,但闪退了

定位权限开了吗
4
帖子
0
勋章
49
Y币

开了呀,但调试版我这边只看到使用期间允许。
之前导航false的时候,open下能看到地图上自己的定位点
380
帖子
4
勋章
6
Y币
BIP212703 · 2023-3-7 09:49开了呀,但调试版我这边只看到使用期间允许。
之前导航false的时候,open下能看到地图上自己的定位点

可能有问题,已反馈给模块技术排查。有结果再回复。
0
帖子
1
勋章
1640
Y币
BIP212703 · 2023-3-7 08:40不开open确实{"status":true}了,但闪退了

闪退日志能发下么?
4
帖子
0
勋章
49
Y币
模块技术支持-L · 2023-3-7 14:12闪退日志能发下么?

在哪里看,我来找给你
12下一页
您需要登录后才可以回帖 登录

本版积分规则