shangrila
shangrila
  • 发布:2022-02-14 11:05
  • 更新:2022-02-14 12:27
  • 阅读:424

app-nvue页面,autoRotate:true发现marker没有跟随polyline的方向而自动旋转

分类:nvue
map

Hbuildex 3.3.11

app-nvue页面,autoRotate:true发现没有跟随polyline的方向而改变方向。
使用的地图是高德地图。

let _this = this;  
                _this.map.translateMarker({  
                    markerId: 1,  
                    autoRotate:true,  
                    // rotate: 30,  
                    destination: {  
                        longitude: datai.longitude, // 车辆即将移动到的下一个点的经度  
                        latitude: datai.latitude, // 车辆即将移动到的下一个点的纬度  
                    },  
                    duration: 700,  
                    animationEnd: function() {  
                        // 轨迹回放完成 处理H5端  
                        _this.playIndex++;  
                        if(_this.playIndex < len){  
                            _this.start(_this.playIndex, data);  
                        }else{  
                            console.log('okokok');  
                            uni.showToast({  
                                title: '播放完成',  
                                duration: 1400,  
                                icon: 'none'  
                            });  
                            _this.playIndex = 0;  
                            _this.isStart = false;  
                            _this.isDisabled = false;  
                        }  
                    },  
                    fail(e) {  
                        // 轨迹回放失败  
                    },  
                });
2022-02-14 11:05 负责人:无 分享
已邀请:
DCloud_Android_ST

DCloud_Android_ST

安卓平台暂时不支持autoRotate。尝试使用moveAlong实现相关功能

该问题目前已经被锁定, 无法添加新回复