selectControl = new OpenLayers.Control.SelectFeature (
>     lyRoute,
>     {displayClass: "olControlSelectFeat", title: "Select Feature",
>     clickout: false,
>     eventListeners:{
>     "activate": function(){highlightCtrl.activate();},
>     "deactivate": function(){highlightCtrl.deactivate();}},
>     onSelect: onFeatureSelect,
>     onUnselect: onFeatureUnselect});
>
What you want is:
     SelectControl.events.on({
                     "featurehighlighted": onFeatureSelect,
                     "featureunhighlighted": onFeatureUnselect
                 });
Dont worry about activate/deactivate.
Just make sure you activate the hover control before the select control.
ie
                 map.addControl(highlightCtrl);
                 map.addControl(SelectControl);
                 highlightCtrl.activate();
                 SelectControl.activate();


-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to