<font face="arial, helvetica, sans-serif" size="2"><div>I guess it is. I'm going deeper in documentation and found this on the drawFeature method:</div><div><br></div><div>«</div><div><i>drawFeature: function(feature,style)</i></div><div><i>Draw (or redraw) a feature on the layer. If the optional style
argument is included, this style will be used. If no style is
included, the feature’s style will be used. If the feature doesn’t
have a style, the layer’s style will be used.</i></div><div>»</div><div><br></div><div>Taken from: </div><div>http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.drawFeature</div><div><br></div><div>I'm assuming that when a feature gets selected, it is redrawn. And since it has a style attached, that's the style OL uses.</div><div><br></div><div>However, I'm also doing this:</div><div><br></div><div><div><br class="Apple-interchange-newline">vectorLayer.events.on({"featureselected": function(e) {</div><div> console.log(logId, e.feature); // confirmes that I'm getting a feature</div><div> var layer = e.feature.layer;</div><div> layer.drawFeature(e.feature, "select");</div><div> }});</div></div><div><br></div><div>But this doesn't work either. From the docs, it should work since the select is a render intent defined on the layer styleMap (If there is a bug, it is here).</div><div><br></div><div>However, this does work:</div><div><div><br class="Apple-interchange-newline">vectorLayer.events.on({"featureselected": function(e) {</div><div> console.log(logId, e.feature);</div><div> var layer = e.feature.layer;</div><div><span> <span> <span> <span> </span></span></span></span>layer.drawFeature(e.feature, <b>{fillCollor: "#000000"}</b>);</div><div> }});</div></div><div><br></div><div>I guess I'm going to have to live with this solution since it works for me and the select style is made on the layer "level".</div><div><br></div><div>However, if anyone can point me if this is a bug or not, I would appreciate, since I'd like to "give something back" to community (although a bug is not what I call a gift... :) )</div><div><br></div><div>I guess there is no need to bother you with sample code (unless you absolutely demand for it :) )</div><div><br></div><div>Thank you Diego!</div><div>Greetings from Portugal!</div><div><br></div><div>Ruben.</div><div><br><br></div></font><div class="">Sent from Alto - altomail.com</div><br><br><br><hr style="border:0;height:1px;color:#999;background-color:#999;width:100%;margin:0 0 9px 0;padding:0;"><b>From: </b>diegoguidi@gmail.com<diegoguidi@gmail.com><br><b>To: </b>mail.roliveira@gmail.com<mail.roliveira@gmail.com><br><b>cc: </b>openlayers-users@lists.osgeo.org<openlayers-users@lists.osgeo.org><br><b>Sent: </b>Tuesday, August 27, 2013<br><b>Subject: </b>Re: [OpenLayers-Users] Can't define hover behavior on a Feature.Vector or a Layer.Vector<br><br><title></title>On Tue, Aug 27, 2013 at 4:27 PM, <a href="mailto:mail.roliveira@gmail.com">mail.roliveira@gmail.com</a><br><<a href="mailto:mail.roliveira@gmail.com">mail.roliveira@gmail.com</a>> wrote:<br>> Could this be a bug?<br>this is exactly how openlayers works, if you override the default<br>style using feature.style, this style is used.<br><br><br><br>Diego Guidi<br>