this.mapCtx.on('markerClusterCreate', res => {
console.log('clusterCreate', res)
const clusters = res.clusters
const markers = clusters.map(cluster => {
const {
center,
clusterId,
markerIds
} = cluster
console.log(markerIds)
})
})
搞死个人哟
this.mapCtx.on('markerClusterCreate', res => {
console.log('clusterCreate', res)
const clusters = res.clusters
const markers = clusters.map(cluster => {
const {
center,
clusterId,
markerIds
} = cluster
console.log(markerIds)
})
})
1 个评论
太坑了,debug了半天才发现,marker 的 id 必须是 number,到这里 ios 正常返回 number[],安卓却是 string[]。