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

Reply via email to