<br><br>On Monday, March 19, 2012, Alex Cassells <<a href="mailto:ACassells@integrated-skills.com">ACassells@integrated-skills.com</a>> wrote:<br>> I am fairly new to OpenLayers and mapping in general but I have quite a lot of js experience. I am not sure if this is the correct forum to raise this but I have been doing some investigation of some OpenLayers behaviors and I thought I would raise what are some possible issues. It is all to do with resymbolising (restyling) vector layers and whether they reload data and whether the resymbolisation takes affect.<br>
><br>> This was prompted by a stack overflow question on OpenLayers <a href="http://stackoverflow.com/questions/9768430/openlayers-redraw-vector-layer-without-downloading-data-again/9770999#9770999">http://stackoverflow.com/questions/9768430/openlayers-redraw-vector-layer-without-downloading-data-again/9770999#9770999</a><br>
><br>> It seems that there is an issue (with both v2.11 and v2.12) if you set the BBox strategy resFactor to 1 and then resymbolise and redraw the Layer you will always refresh the data from the server. This is because the BBox strategy logic infers (wrongly in my opinion) that the data is invalid and needs to be refreshed. I am happy looking at this and suggesting a possible fix for this but this raised potentially a larger issue with v2.12. If you try to resymbolise a vector layer and then use layer.redraw() to redraw the layer with the new style in v2.12 the redraw does nothing, previously the layer.redraw() function would show the new styling of the vector features. In v2.12 you have to do something like pan the map to make the changes take affect. I presume this is a bug and the redraw() function should show the layer with new symbols on the map (please forgive me if I am wrong about this).<br>
<br><br>Hi. How old is your OpenLayers? The bug you describe sounds like a bug we fixed 10 days ago. See <<a href="https://github.com/openlayers/openlayers/pull/312">https://github.com/openlayers/openlayers/pull/312</a>><br>
<br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br><br>