[Gvsig_english] Refresh WMS and WFS layers

Flavio Pompermaier fla83tn at gmail.com
Wed Mar 23 23:28:13 CET 2011


Excuse for the delay..I forgot to answer back to you..I solved the problem
putting at the end of my refresh method the following line:

mapCtrl.drawMap(false);

with such a method call everithing were refreshed properly...However it's
very unintuitive..I think that mapCtrl.redraw() should do the same
thing..isn't it?

2011/2/12 Nacho Uve <nachouve at gmail.com>

> Flavio, are you solved this problem?
>
>
> 2010/12/16 Flavio Pompermaier <fla83tn at gmail.com>
>
>> Hi to all,
>> can comeone help me with this problem? I would like to refresh WFS and
>> WMS layers after a modification to underlying data in SDE. However,
>> the SAME code that reloads geometries in map after a pan doesn't work
>> when I force it after the closure of a dialog.
>> I also tried to call View invalidate, MapControl invalidate() and all
>> possible methods to make gvSIG redraw the view content.
>> Am I missing something?
>>
>> Here's the code that I use for WMS layers for example:
>>  FLayers layers = mapCtrl.getMapContext().getLayers();
>>  mapCtrl.getMapContext().beginAtomicEvent();
>>  for (FLayer fLayer : visibles) {
>>     else if (fLayer instanceof FLyrWMS) {
>>           FLyrWMS wmsLayer = (FLyrWMS) fLayer;
>>           try {
>>                wmsLayer.load();
>>           }
>>           catch (LoadLayerException e) {
>>                log.error("Error while refreshing layer " +
>> wmsLayer.getName(), e);
>>            }
>>            String infoText = traduci("refreshing_layer") + " " +
>> wmsLayer.getName();
>>
>>  PluginServices.getMainFrame().getStatusBar().setInfoText(infoText);
>>        }
>>  }
>>  mapCtrl.getMapContext().endAtomicEvent();
>>
>> For WFS layers I even have to replace the FLayer to force their
>> reloading...o can there be a simpler way? Using only load() o reload()
>> does nothing...
>>
>> Best regards,
>> Flavio
>> _______________________________________________
>> Gvsig_internacional mailing list
>> Gvsig_internacional at listserv.gva.es
>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>>
>
>
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20110323/fe2eb0c2/attachment.htm 


More information about the Gvsig_internacional mailing list