Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i have a problem with refreshing layers.
I have WMS and WFS layers from one source. I edit WFS and after do wms_layer.redraw(true) but layer redraw only after zoom in or zoom out.

Same with WFS. i have wfs_layer.visibility=false and do wfs_layer.visibility=true wfs_layer.refresh({force:true}). And layer refresh only after zoom in or zoom out.
For do this operations i gonna do a something special?

share|improve this question
I'm not sure but for manipulating of visibility of layers you should use setVisibility method of layer not set up visibility property directly. –  drnextgis Aug 1 '12 at 6:38

1 Answer 1

up vote 1 down vote accepted

For redraw WMS layer use redraw method of OpenLayers.Layer.HTTPRequest. For example:


Refresh method doesn't pass any parameters, so for redraw wfs layer use the following syntax:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.