<div dir="ltr">I'm trying something just like that now -- adding a new 'renderIntent' like:<div><br></div><div><div> var selectStyle = style.clone();</div><div> if (options.iconOptions && options.iconOptions.selectedExternalGraphic) {</div>
<div> selectStyle.context.externalGraphic = function (feature) {</div><div> if (!feature.cluster) {</div><div> return feature.layer.iconOptions.selectedExternalGraphic;</div><div>
}</div><div> return "";</div><div> };</div><div> }</div><div> selectStyle.defaultStyle.strokeColor = '#33ffff';</div><div> selectStyle.defaultStyle.strokeWidth = 4;</div>
<div><br></div><div><span class="" style="white-space:pre"> </span>var viewedStyle = style.clone();</div><div> if (options.iconOptions && options.iconOptions.viewedExternalGraphic) {</div><div> viewedStyle.context.externalGraphic = function (feature) {</div>
<div> if (!feature.cluster) {</div><div> return feature.layer.iconOptions.viewedExternalGraphic;</div><div> }</div><div> return "";</div><div> };</div>
<div> }</div><div> viewedStyle.defaultStyle.strokeColor = '#33ffff';</div><div> viewedStyle.defaultStyle.strokeWidth = 4;</div><div> var styleMap = new OpenLayers.StyleMap({ "default": style, 'select': selectStyle, "viewed": viewedStyle });</div>
</div><div class="gmail_extra"><br>and hoping to just set feature.renderIntent in the click event handler (then call layer.drawFeature(feature, renderIntent). I'm very new to OL.</div><div class="gmail_extra"><br></div>
<div class="gmail_extra">Thanks!</div><div class="gmail_extra"><br></div></div>