I'm trying to draw a box on a clustered map which will surround every selected feature. I've got this right now, but it doesn't seem to be working (no box appears). Any help would be appreciated :-)

var bounds=null;
for(i in stations.selectedFeatures)
  for(x in stations.selectedFeatures[i].cluster)
    if(bounds==null)
bounds=stations.selectedFeatures[i].cluster[x].geometry.getBounds().clone();
    else
bounds.extend(stations.selectedFeatures[i].cluster[x].geometry.getBounds());

Fit_box=bounds.toGeometry().components[0];
Fix_box=new OpenLayers.Feature.Vector(Fit_box, null, {fillColor: "green"});
VectorLayer.addFeatures([Fit_box]);
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to