I've made a simple mock-up trying to combine two openlayers examples. I want to have clusters on which I can hover (so I can display an infowindow about it's content) and I want users to be able to click on them to zoom to these clusters.
The last part I've allready made. Take a look at this jsFiddle http://jsfiddle.net/BzcAD/2/
You might recognize the following two examples: http://www.openlayers.org/dev/examples/highlight-feature.html http://www.openlayers.org/dev/examples/strategy-cluster-threshold.html
Now the jsFiddle halts on the error : "TypeError: this.layer.getZIndex is not a function"
You can stop this error by uncommenting the lines regarding the selectCtrl. Like so:
// var selectCtrl = new OpenLayers.Control.SelectFeature(
// {clickout: true}
// );
map.addControl(highlightCtrl);
// map.addControl(selectCtrl);
highlightCtrl.activate();
// selectCtrl.activate();
then you get a working example, except that it does zoom to the cluster on hover.
I realy don't know how to fix this. Any ideas? Many thanks in advance