The key bits from example are:
                        kmlHoverSelectControl = new 
OpenLayers.Control.SelectFeature(kmlLayers,{hover:true, highlightOnly: 
true, renderIntent: "temporary" });
                        kmlSelectControl = new 
OpenLayers.Control.SelectFeature(kmlLayers,{clickout: true});
                        kmlSelectControl.events.on({
                                 "featurehighlighted": onKmlFeatureSelect,
                                 "featureunhighlighted": 
onKmlFeatureUnselect
                        });
                        map.addControl(kmlHoverSelectControl);
                        map.addControl(kmlSelectControl);
                        kmlHoverSelectControl.activate();
                        kmlSelectControl.activate();
kmlLayers is array of layers (in this case kml). Order matters. 
HoverSelect control , the SelectControl.

With this, I highlight features as you mouse over, then select on click.

-- 
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
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to