如何添加单击群集图标的功能,该图标会缩放到标记已经开始出现的位置?
这就是我创建集群的大致方式:
const clusterer = new YMapClusterer({
method: clusterByGrid({ gridSize: 64 }),
features: points,
marker: feature =>
new YMapMarker(
{
coordinates: feature.geometry.coordinates,
source: 'clusterer-source',
},
createClusterMarkerHtmlElement(feature)
),
cluster: (coordinates, features) =>
new YMapMarker(
{
coordinates,
source: 'clusterer-source',
},
createClusterCircleHtmlElement(features.length)
),
})
这是我想到的唯一实现。如果有人提供更简洁的选择,我会很高兴