[GIS] How to remove a feature style in openlayers

openlayers

I need to remove a feature style to set up another one. How can I do it? Do I just have to set up the new one and the last one will be removed by default?

I've looked at the documentation and did not found any answer to this.

Best Answer

Yes, you just assign a new style to your vector layer or your feature using the setStyle method. The old one is removed automatically.