[OpenLayers-Users] How to refresh layer vector?

Pol D. pol.dellaiera at gmail.com
Mon Jun 17 06:20:04 PDT 2013


I think you have a new refresh strategy in 2.13, maybe it worth the look.

  -φol d.-


On Mon, Jun 17, 2013 at 3:17 PM, StevenDenHartog <
steven.den.hartog at gmail.com> wrote:

> adidas wrote
> > Hello! How to refresh layer vector?
> > Trying:
> > _function refreshAllLayers() {__
> > __    lineLayer.refresh( { force: true } );__
> > __    lineLayer_halo.refresh( { force: true } );__
> > __}_
> > ...
> > _
> > <button onclick="javascript: refreshAllLayers()">
> > Refresh
> > </button>
> > _
>
> Hey there!
> Are you still having problems with this? The way the refresh function works
> is that it refreshes the data in the vector layer, but it does not actually
> cause a redraw of the layer. Please try the following:
>
> _function refreshAllLayers() {__
> __    lineLayer.refresh( { force: true } );__
> __    lineLayer_halo.refresh( { force: true } );__
> __    lineLayer.redraw();__
> __    lineLayer_halo.redraw();__
> __}_
> I hope this solved the problem!
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/How-to-refresh-layer-vector-tp5059906p5060588.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130617/8f29a7e9/attachment.html>


More information about the Users mailing list