<font face="arial, helvetica, sans-serif" size="2"><div class="">Hi.</div><div class=""><br></div><div class="">I'm facing what appears to be a simple problem but there is something missing that I can't figure it out what it is...</div><div class=""><br></div><div class="">Hi have this layer:</div><div class=""><br></div><div class=""><div class="">var <b>layer_style</b> = new OpenLayers.StyleMap({</div><div class="">            "select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({</div><div class="">            <span class="Apple-tab-span" style="white-space:pre">    </span>fillColor: "#626262",</div><div class="">            <span class="Apple-tab-span" style="white-space:pre"> </span>strokeColor: "#111111"}, OpenLayers.Feature.Vector.style["select"]))</div><div class="">        });</div><div class=""><br></div></div><div class=""><div class="">var <b>vectorLayer</b> = new OpenLayers.Layer.Vector("prach layer", {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                      </span>styleMap: layer_style,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                    </span>renderers: ['SVG', 'VML', 'Canvas']</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                       </span>});</div><div class=""><br></div><div class=""><br></div><div class=""><br></div><div class="">And have several <i>OpenLayers.Feature.Vector</i> instances that are added to <b>vectorLayer</b>:</div><div class=""><br></div><div class="">features = [];</div><div class=""><br></div><div class="">// START: for loop that sets different colors on each iteraction</div><div class=""><div class="">var fv = new <b>OpenLayers.Feature.Vector</b>(linearRing); // linearRing is an instance of OpenLayers.Geometry.LinearRing determined previously</div><div class=""><br></div><div class="">fv.<b>style</b> = {strokeWidth: "#123456" ,strokeColor: "#123456", fillColor: "#123456", fillOpacity: "#123456"};</div><div class=""><br></div><div class="">features.push(fv);</div><div class="">// END: for loop that sets different colors on each iteraction</div><div class=""><br></div><div class="">vectorLayer.addFeatures(features);</div><div class=""><br></div><div class="">==</div><div class=""><br></div><div class="">My problem is:</div><div class=""><br></div><div class="">If I click on each created shape the shape doesn't get selected as I would expect from the <b>layer_style</b> definition.</div><div class="">But if I remove the style from each Feature.Vector, then the select behavior works. However, I really need to have a style on each Feature.Vector.</div><div class=""><br></div><div class="">I can't figure out why the layer select behavior isn't working.</div><div class="">As an alternative, is it possible to have a select style (as a render intent) on the <i>Feature.Vector</i>, instead of having it on the layer? From the docs, it seem this is not possible since the <i>Feature.Vector</i> only allows a style definition that maps the SVG style directives (http://dev.openlayers.org/docs/files/OpenLayers/Feature/Vector-js.html#OpenLayers.Feature.Vector.OpenLayers.Feature.Vector.style).</div><div class=""><br></div><div class="">On firebug, I can see that each Feature.Vector has a <b>renderIntent</b> set to 'default', so I deduce a Feature.Vector also has a renderIntent (probably inherited from the layer's renderIntent?).</div><div class=""><br></div><div class="">Any idea on how to solve this?</div><div class=""><br></div><div class="">Thanks in advance.</div></div>Ruben.</div></font>