[OpenLayers-Dev] Select Feature - programatically select - doesn't check if feature is already selected

Ivan Grcic ivan.grcic at geofoto.hr
Thu Aug 6 05:41:51 EDT 2009


If we do several times:

selectContorl.select(feature)

feature is added to layer.selectedFeature array several times.

Should we first check  if the feature is allready selected (ill open a ticket)

if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) {
    this.select(feature);
}

Or we leave selectControl as it is, and leave this to user to solve it
on application level?

Regards

-- 
Ivan Grcic



More information about the Dev mailing list