<template>
<view class="content">
<menghnMap @regionchange="regionchange" @navigation="navigation" @markertaptap="markertaptap" @tapMap="tapMap"
:markers="markers" :latitude="latitude" :longitude="longitude" :showOper="showOper"/>
</view>
</template>
<script>
import menghnMap from '@/components/menghn-map/menghn-map'
export default {
components: {
menghnMap
},
data() {
return {
latitude: '22.568887404083515',
longitude: '113.88770606927332',
scrollTimer: null,
showOper:false,
markers: [{
distance: 0.05828283926096898,
id: 27595,
latitude: "22.568887404083515",
longitude: "113.88770606927332",
title: '玄妙的',
iconPath: '../../static/dwicon.png',
width: 35,
height: 35,
},
{
distance: 0.05828283926096898,
id: 27595,
latitude: "22.568382855230592",
longitude: "113.8894362439249",
title: '玄妙的',
iconPath: '../../static/dwicon.png',
width: 35,
height: 35,
}
],
}
},
onLoad() {
},
methods: {
regionchange(e) {//移动地图触发
if (this.scrollTimer != null) {//节流
clearTimeout(this.scrollTimer);
}
this.scrollTimer = setTimeout(() => {
if (e.type == 'end' && e.causedBy == 'drag') {
console.log('地图移动了');
}
}, 500)
},
navigation(e) {
console.log('navigation');
},
markertaptap(e) {
console.log('markertaptap');
},
tapMap(e) {//点击地图触发
this.showOper = !this.showOper;
console.log('tapMap');
}
}
}
</script>
<style scoped>
.delShow{
position: absolute;
top: ;
}
</style>

小蒋同学
- 发布:2023-03-18 22:55
- 更新:2024-06-26 15:25
- 阅读:486
2 个回复
1***@qq.com
大佬你好,我使用了你的插件,出现了以下报错请问这是什么情况,我的操作有什么问题吗
小伟刚
经纬度引号去掉