1***@qq.com
1***@qq.com
  • 发布:2023-05-12 19:21
  • 更新:2023-05-12 19:21
  • 阅读:343

v3模式下 map设置中心点不生效,即 moveToLocation

分类:nvue
map

APP nvue:v3模式下 map设置中心点不生效,即 moveToLocation
微信小程序:正常

<map :style="'width: 750rpx;z-index: 0;height: '+nintyPercentScreenHeight" id="map" show-location show-scale scale="scale" longitude="longitude" latitude="latitude" markers="markers" @markertap="marKerId" enable-satellite="satelliteChange" >
</map>

const mapCtx = uni.createMapContext('map', this);
mapCtx.moveToLocation({
latitude: newValue[selectedDevice.selected].latitude,
longitude: newValue[selectedDevice.selected].longitude,
success: () => {
console.log("地图中心点变化了")
},
fail: (e) => {
console.log(e);
console.log("moveToLocation移动失败!");
},
complete:() => {
console.log("moveToLocation移动");
}
});

2023-05-12 19:21 负责人:无 分享
已邀请:

要回复问题请先登录注册