I have a bunch of tracks on screen in a vector layer. I used some hover and select styles in the layer styleMap and these styles are properly triggered by:

    var highlightCtrl = new OpenLayers.Control.SelectFeature(tbTrack.vector, {
        hover: true,
        highlightOnly: true,
        renderIntent: "hover",

    var selectCtrl = new OpenLayers.Control.SelectFeature(tbTrack.vector,
        {clickout: true, renderIntent: "select"}



All these tracks are listed in a table under the map. I want to trigger the corresponding hover and select styles for a track if I click or hover on them in the table. How to do this? I allready have the coupling between the table and the lines, I just don't know the right way to trigger the hover or select events.


This question has been answered before on stackoverflow:


| improve this answer | |
  • thanks, I didn't found that one, but it works. – Jeroen Jul 12 '12 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.