bug
This commit is contained in:
@@ -71,9 +71,6 @@
|
||||
let {lib: TMap, map} = this
|
||||
if (map) {
|
||||
if (this.markers.length) {
|
||||
console.log(this.MarkerCluster)
|
||||
// this.MarkerCluster.destroy()
|
||||
// this.MarkerCluster = null
|
||||
this.markers.forEach(v => {
|
||||
v.setMap(null)
|
||||
})
|
||||
@@ -134,6 +131,7 @@
|
||||
enableDefaultStyle: false, // 关闭默认样式
|
||||
geometries: points.map(e => ({
|
||||
position: new TMap.LatLng(e.lat, e.lng),
|
||||
id: e.id,
|
||||
content: `${e.name}`,
|
||||
properties: {...e}
|
||||
})) || [],
|
||||
@@ -164,11 +162,12 @@
|
||||
cls.push(clusterBubble)
|
||||
} else {
|
||||
//点标记样式
|
||||
let {content} = item.geometries?.[0] || {},
|
||||
let {content, id} = item.geometries?.[0] || {},
|
||||
overlay = new ClusterBubble({map, position: item.center, content})
|
||||
overlay.on('click', () => {
|
||||
this.buildPopup = true
|
||||
this.building = item.geometries?.[0]?.properties || {}
|
||||
uni.navigateTo({
|
||||
url: `../AppMerchantManage/detail?id=${id}`
|
||||
})
|
||||
})
|
||||
this.markers.push(overlay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user