I've created a bunch of Feature.Vectors from Point objects and assigned them a Style. Now I want to dynamically change the appearance of one of the features in real time; e.g., change it from red to blue. (I am NOT hovering over the feature.) I've tried changing its Style, then doing refresh() on the layer, or redraw(), etc, and either nothing happens or the feature disappears. Any suggestions? Thanks.
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
Redraw method should solve your problem, see my little example: OpenLayers: modifying feature style UPD: I've modified my example a little bit: OpenLayers: modifying one feature style |
|||||||
|
|
I agree with @drnextgis that redraw will do (+1 for nice sample). Though in your situation, since you want to just redraw a single feature, I would use |
|||
|
|
