[OpenLayers-Users] popup + unSelect

Ricardo Bayley ricardo.bayley at gmail.com
Wed Apr 6 18:10:20 EDT 2011


Hi folks,

I cant fire the unSelect event from the selectControl when I click outside
the selected feature.
If I click anywhere on the map, the event wont fire. It only fires when
another feature is selected.

Anybody might know why ?

this is my code:

var selectedCtrl = new OpenLayers.Control.SelectFeature(
properties.layers.searchLayer,{
onSelect : onFeatureSelect,
onUnselect : onFeatureUnselect
}
);

function onFeatureUnselect(f){
//alert(f.attributes.fid);
try
{
    map.removePopup(f.popup);
    f.popup.destroy();
    f.popup = null;
}
catch(err)
{
//Handle errors here
}
};


warm regards


Ricardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110406/65d1e258/attachment.html


More information about the Users mailing list