当您单击所有标记具有相同坐标的簇时,地图比例不会增加,但会立即打开包含标记信息的气球。我尝试通过 clusterDisableClickZoom - 它不起作用。
myObjectManager.clusters.events.add(['click'], function (e) {
var objectId = e.get('objectId'),
cluster = myObjectManager.clusters.getById(objectId),
first = cluster.features[0],
match = true,
ids = [];
for (var i = 0; i < cluster.features.length; i++) {
let feature = cluster.features[i];
ids.push(feature.place_id);
if (i > 0 && match) {
match = first.geometry.coordinates[0] == feature.geometry.coordinates[0] &&
first.geometry.coordinates[1] == feature.geometry.coordinates[1];
}
}
myObjectManager.options.set('clusterDisableClickZoom', match);
...
});