On Tue, Jul 8, 2008 at 11:11 PM, Arnd Wippermann <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I change the style only for a single feature on a layer.
>
> Using the below code I change the style for all features on a layer. But I
> have no clue, how to do this only for one feature. I hope someone can help
> me.
>
> var feature=vlayer.features[vlayer.features.length-1];
>
> var obj=feature.layer.styleMap.styles.default.defaultStyle;
>
> obj.fillColor=strokeColor;
> obj.fillOpacity=fillOpacity;
> obj.strokeColor=strokeColor;
> obj.pointRadius=pointRadius;
> obj.strokeWidth=strokeWidth;
>
> vlayer.drawFeature(feature);}

vlayer.drawFeature(feature, {
    'fillColor':
    'fillOpacity':
    ...
});

--
Eric
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to