This may well be my issue, I will check again and retest, apologies for the spam. ____________________________T____________ From: Eric Lemoine [[email protected]] Sent: 19 March 2012 21:29 To: Alex Cassells Cc: [email protected] Subject: Re: [OpenLayers-Dev] Issue with BBox resfactor and Vector Layer redraw() in v2.12
On Monday, March 19, 2012, Alex Cassells <[email protected]<mailto:[email protected]>> wrote: > 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. > > This was prompted by a stack overflow question on OpenLayers > http://stackoverflow.com/questions/9768430/openlayers-redraw-vector-layer-without-downloading-data-again/9770999#9770999 > > 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). Hi. How old is your OpenLayers? The bug you describe sounds like a bug we fixed 10 days ago. See <https://github.com/openlayers/openlayers/pull/312> -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected]<mailto:[email protected]> http://www.camptocamp.com _______________________________________________ Dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-dev
