正常位置
小程序 运行时 位置偏差很大 缩放地图 maker位置随之变化
网页端 手机模式 也会发生偏移
源码 <template> <view class = "content"> <map style="width: 100%; height: 90vh;" :style="{height:mapheight}" :show-location='true'scale="scale" :latitude="latitude" :longitude="longitude" :markers="marker" :enable-zoom='true' @markertap="markertap" @callouttap='callouttap'>
</map>
</view>
</template>.
adddata() {
console.log("===adddata===");
this.list.map((item, index) => {
this.marker.push({
id: index + 1,
latitude: item.lat, //纬度
longitude: item.lng, //经度
iconPath: '/static/map/qa.png', //显示的图标
rotate: 0, // 旋转度数
width: 10, //宽
height: 10, //高
title: item.name, //标注点名
alpha: 0, //透明度
},
callout: { //自定义标记点上方的气泡窗口 点击有效
content: item.name, //文本
color: '#ffffff', //文字颜色
fontSize: 14, //文本大小
borderRadius: 15, //边框圆角
borderWidth: '0',
bgColor: item.flag == "0" ? '#e51860' : '#43b80d', //背景颜色
display: 'ALWAYS', //常显
},
})
})
}