Yes, that is the problem. Hover should be activate before select control. Thanks a lot, Phil.
On Mon, Dec 6, 2010 at 8:51 PM, Phil Scadden [via OSGeo.org] < [email protected]<ml-node%[email protected]> > wrote: > 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 > [hidden email] <http://user/SendEmail.jtp?type=node&node=5810384&i=0> > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > ------------------------------ > View message @ > http://osgeo-org.1803224.n2.nabble.com/Tolerance-for-SelectFeature-Control-tp5801201p5810384.html > > To unsubscribe from Tolerance for SelectFeature Control, click > here<http://osgeo-org.1803224.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5801201&code=Zy5jLmNoZW4ubWFjQGdtYWlsLmNvbXw1ODAxMjAxfC0yMDM3NzEzNzgy>. > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Tolerance-for-SelectFeature-Control-tp5801201p5813738.html Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
