let mapContext = wx.createMapContext('map')
mapContext.initMarkerCluster()
let markerArr = []
for (let i = 0; i < 8000; i++) {
markerArr.push({
id: i,
joinCluster: true,
longitude: 109.1867 + Math.random(),
latitude: 18.69922 + Math.random(),
iconPath: '/images/icon/loc.png',
width: '24',
height: '24',
title: `学校${i}`
})
}
mapContext.addMarkers({
markers: markerArr,
clear: false,
complete(res) {
console.log('clusterCreate addMarkers', res)
}
})