[Geoserver-users] [Geoserver-devel] How to Update/change Geoserver WMS layer using Openlayers 2.13?

You may wish to ask on the user list; the developer list is used for those working on geoserver.

···

On 28 June 2015 at 20:23, Wondimagegn Tesfaye <wondim81@anonymised.com> wrote:

Dear Members,

I am planning to use Geoserver WMS layer for many administrative areas with raster layer (geotiff). So my objective is, when someone selects another administration area, I want the layer to refresh and change layer features. I know, I can remove one layer and add another one but I have many layers. The code could be shorter by changing url of a layer or the layer name itself.

My second objective is to use PostGIS data as a store. This layer is dynamic and data changes on PostGIS based on user input and I would like to refresh the layer when user clicks a button. I tried the following code but the problem I am getting is, the default view caches the previous image.


```
 function updateWMS(){
    mywms.getSource().dispatchChangeEvent();
    map.updateSize();
 }
```

Regards, 
Wondimagegn

Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

Thank you for the replay Jody. I have asked the same question on 27th June but didn’t get a repay yet. That is why I posted the same question here.

···

On Mon, Jun 29, 2015 at 6:51 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

You may wish to ask on the user list; the developer list is used for those working on geoserver.


Jody Garnett

On 28 June 2015 at 20:23, Wondimagegn Tesfaye <wondim81@anonymised.com> wrote:

Dear Members,

I am planning to use Geoserver WMS layer for many administrative areas with raster layer (geotiff). So my objective is, when someone selects another administration area, I want the layer to refresh and change layer features. I know, I can remove one layer and add another one but I have many layers. The code could be shorter by changing url of a layer or the layer name itself.

My second objective is to use PostGIS data as a store. This layer is dynamic and data changes on PostGIS based on user input and I would like to refresh the layer when user clicks a button. I tried the following code but the problem I am getting is, the default view caches the previous image.


```
 function updateWMS(){
    mywms.getSource().dispatchChangeEvent();
    map.updateSize();
 }
```

Regards, 
Wondimagegn

Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

It could be that nobody knows the answer to your question, or understood what you were trying to ask. Do keep in mind this is the geoserver list and your question appears to be about open layers!?

We have some guidelines on writing good questions.

···

On 29 June 2015 at 10:21, Wondimagegn Tesfaye <wondim81@anonymised.com> wrote:

Thank you for the replay Jody. I have asked the same question on 27th June but didn’t get a repay yet. That is why I posted the same question here.


Jody Garnett

On Mon, Jun 29, 2015 at 6:51 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

You may wish to ask on the user list; the developer list is used for those working on geoserver.


Jody Garnett

On 28 June 2015 at 20:23, Wondimagegn Tesfaye <wondim81@anonymised.com> wrote:

Dear Members,

I am planning to use Geoserver WMS layer for many administrative areas with raster layer (geotiff). So my objective is, when someone selects another administration area, I want the layer to refresh and change layer features. I know, I can remove one layer and add another one but I have many layers. The code could be shorter by changing url of a layer or the layer name itself.

My second objective is to use PostGIS data as a store. This layer is dynamic and data changes on PostGIS based on user input and I would like to refresh the layer when user clicks a button. I tried the following code but the problem I am getting is, the default view caches the previous image.


```
 function updateWMS(){
    mywms.getSource().dispatchChangeEvent();
    map.updateSize();
 }
```

Regards, 
Wondimagegn

Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel