【类 型】:fix 地图组件长按函数 经度未定义
【原 因】:组件自带函数 变量名lng 【过 程】:转存到lon 取值时候取lonLat.lon 【影 响】:
This commit is contained in:
parent
f13072f4ce
commit
56a35ef399
@ -209,7 +209,7 @@ export default {
|
||||
this.map.on('mousedown', (event) => {
|
||||
// pc端点击事件
|
||||
pressTimer = setTimeout(() => {
|
||||
const lonLat = this.map.unproject(event.point)
|
||||
const lonLat = { lon: this.map.unproject(event.point).lng, lat: this.map.unproject(event.point).lat }
|
||||
// 将经纬度信息传递到组件外部
|
||||
this.$emit('longPress', lonLat)
|
||||
}, 1000) // 作为长按的时间阈值
|
||||
|
Loading…
Reference in New Issue
Block a user