详情代码查看附件
1***@qq.com
- 发布:2020-04-29 18:17
- 更新:2023-06-09 14:35
- 阅读:1232
HBuilderX 3.8.4 vue(v3)/nvue/nvue(vue3) Android 12 验证没有问题,参考下面的代码
<template>
<view>
<map id="map1" class="map1" show-location="true" :latitude="latitude" :longitude="longitude" scale="16"></map>
<button @click="moveToLocation">move to location</button>
</view>
</template>
<script>
export default {
data() {
return {
// latitude: 39.989631,
// longitude: 116.481018,
latitude: 39.925539,
longitude: 116.279037
}
},
onReady() {
this.mapContext = uni.createMapContext("map1", this);
},
methods: {
moveToLocation() {
this.mapContext.moveToLocation({
latitude: 39.989631,
longitude: 116.581018,
success: (res) => {
console.log("moveToLocation");
console.log(res);
}
})
}
}
}
</script>
<style>
.map1 {
width: 750rpx;
height: 400px;
}
</style>
暮雪骄阳
能不能有人理一下,这升级好几个版本了,真的上次做个项目用的5+拖了两年,现在改用UNIAPP,也没个准。尽拿来当游戏玩了
2020-05-21 11:24
YyJj123123
回复 暮雪骄阳: 大哥,最后咋解决的?我这里也碰到了,官方说这是bug,还没解决
2022-02-08 12:01