I have been working from a sample on point clustering from cartodb. I would like to have an infowindow show when someone hovers over a series of points. This infowindow will display a different template if the points_count is greater than one. Any pointers on why in this case the info window is not showing up at all? When i do have the info window as part of the layer definition, i.e before calling addInteraction, is does show the default infowindow, but i want to have custom info windows based on the counts in the cluster.
So the issue I think is that your creating a new info window each time you hover over a feature
hovers[layer] = 1;
var infowindow = new cdb.vis.Vis.addInfowindow(map, markerLayer.getSubLayer(layer), ['cartodb_id']);
and have two conditionals in the pop up template.