<view class="row-bottom">
<map id="map" :longitude="longitude" :latitude="latitude" :scale="scale" :circles="circles" :markers="markers" :polyline="polyline" show-location style="width: 100%; height: 500rpx;"></map>
</view>
that.markers = [{
id: "0",
latitude: that.latitude,
longitude: that.longitude,
width: 50,
height: 50,
iconPath: '../../static/img/location.png',
title: "提示"
}];
uni.getLocation({
type: 'gcj02',
success: function(res) {
console.log(res, 'www')
console.log(res, 'res.latitude', )
}
})
<view class="box-border" ">
<view class="ib" ">
<view class="" ">
姓名 : {{name}}
</view>
<view class="" >
地址 : {{addr}}
</view>
</view>
<view class="ib" ;">
<img src="../../static/img/nearme.png" alt="" @click="markertap" >
</view>
</view>
markertap(e) {
let that = this
console.log(e.markerId)
uni.openLocation({
latitude: that.latitude,
longitude: that.longitude,
name: "目的地",
scale: 15,
address: "目的地"
})
},