解决方案:
使用微信小程序的api
<view> <map id="map" style="width:100%;height:360rpx;margin-top:26rpx;" :markers="covers" class="map" scale="14" :latitude="36.67307656394509" :longitude="116.90653006615773" ></map> </view> <script> //初始化api onReady(){ //map是map地图标签的id值 this.mapCtx = wx.createMapContext('map') }, methods:{ jumpMap(){ //传递经纬度 this.mapCtx.openMapApp({ latitude: 39.9085, longitude:116.39747, destination:'罗布泊', success:()=>{ console.log('导航触发成功'); }, fail:()=>{ console.log('导航触发失败'); }, }) }, } </script>