优化地图

This commit is contained in:
yanran200730
2022-07-07 14:26:55 +08:00
parent a1e18f7c8b
commit d6038f1015

View File

@@ -58,19 +58,15 @@
this.businessName = item.businessName this.businessName = item.businessName
this.isShow = false this.isShow = false
this.map.easeTo({ this.map.setCenter(new this.lib.LatLng(item.lat, item.lng))
center: new this.lib.LatLng(item.lat, item.lng), this.map.setZoom(22)
zoom: 23
}, {
duration: 800
})
setTimeout(() => { setTimeout(() => {
document.querySelectorAll('.marker').forEach(e => { document.querySelectorAll('.marker').forEach(e => {
e.classList.remove('marker-active') e.classList.remove('marker-active')
}) })
document.querySelector(`.marker-${item.id}`).classList.add('marker-active') document.querySelector(`.marker-${item.id}`).classList.add('marker-active')
}, 900) }, 400)
}, },
getList (isSearch) { getList (isSearch) {