wow -- that worked. by adding a new style keyed by 'viewed', all I had to do in my select feature code was:
f.renderIntent = 'viewed'; f.layer.drawFeature(f, 'viewed'); and it now is that state. -bdb On Thu, Aug 8, 2013 at 6:18 PM, Brian Busch <[email protected]> wrote: > I'm trying something just like that now -- adding a new 'renderIntent' > like: > > var selectStyle = style.clone(); > if (options.iconOptions && > options.iconOptions.selectedExternalGraphic) { > selectStyle.context.externalGraphic = function (feature) { > if (!feature.cluster) { > return > feature.layer.iconOptions.selectedExternalGraphic; > } > return ""; > }; > } > selectStyle.defaultStyle.strokeColor = '#33ffff'; > selectStyle.defaultStyle.strokeWidth = 4; > > var viewedStyle = style.clone(); > if (options.iconOptions && > options.iconOptions.viewedExternalGraphic) { > viewedStyle.context.externalGraphic = function (feature) { > if (!feature.cluster) { > return feature.layer.iconOptions.viewedExternalGraphic; > } > return ""; > }; > } > viewedStyle.defaultStyle.strokeColor = '#33ffff'; > viewedStyle.defaultStyle.strokeWidth = 4; > var styleMap = new OpenLayers.StyleMap({ "default": style, > 'select': selectStyle, "viewed": viewedStyle }); > > and hoping to just set feature.renderIntent in the click event handler > (then call layer.drawFeature(feature, renderIntent). I'm very new to OL. > > Thanks! > >
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
