Thanks to both, Bart and Tobias! It turns out that both method worked. I was using feature.style, as Bart suggested, but it seems that all the features were referencing the same style object, so now I clone the style object each time I request the current style and it's working like I wanted. And parameterizing also did the trick. Thanks again for the quick replies, Claudio.
2012/9/28 Bart van den Eijnden <[email protected]> > You can associate the style with the feature, i.e. set feature.style. > > Otherwise, show us some of your relevant code. > > Best regards, > Bart > > -- > Bart van den Eijnden > OpenGeo - http://opengeo.org > Expert service straight from the developers. > > > > On Sep 28, 2012, at 2:45 PM, Claudio V. <[email protected]> > wrote: > > Hello, I'm working in an application that allows the user to draw over the > map and has a side panel with controls for the color, opacity and stroke > width. I have a single vector layer where all the drawn features are added. > However, I want each feature to use the currently selected style. That > happens at first, but, as soon as the map is moved/zoomed all the features > are updated to use the current style. > Is there a way to style features individually in a single vector layer? > Thanks in advance, > Cláudio V. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > >
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
