I have clustering enabled on an OpenLayers map and have used code from the first answer in: Openlayers zoom in on cluster to zoom in on a cluster.
function onFeatureClick(event) {
if (event.feature.cluster.length > 1) {
// *** Change this so that the map zooms on cluster location ***
map.setCenter(event.feature.geometry.getBounds().getCenterLonLat());
map.zoomIn();
} else {
// popup code
}
}
Q: Is it possible to zoom on the cluster location so that it stays in the same place? Right now the cluster gets centered on the map. In other words the cluster should not move when zoomed in.