Marco Ciaramella
Marco Ciaramella

Reputation: 228

ol3 update layer after time change

I want to refresh my ol.layer.Tile with an ol.source.TileWMS as source, but calling source.updateParams has no effects and chrome inspector tool doesn't show network activities, such as geoserver requests. So where is the trick?

I use ol v3.16.0

Upvotes: 1

Views: 312

Answers (2)

Marco Ciaramella
Marco Ciaramella

Reputation: 228

I solved by upgrading to v3.18.2

Upvotes: 1

Mr Phung
Mr Phung

Reputation: 71

You can using the params with parameter STYLE

For example:

var params = {LAYERS: layerId, VERSION: '1.3.0', STYLES: style};
var source = layer.getSource();
source.updateParams(params); 

Inside, style is the name of style in the geoserver

Upvotes: 1

Related Questions