Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

This question has been answered before on stackoverflow:

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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