WMS Style Problem #2330
-
Greetings, I have a WMS for which I need to change the style at runtime. I would like to know, even in terms of cache, which is the most correct approach to avoid slow tile processing.
Currently I'm handling it like point 1), so, every time I change the style, I remove the layer from the Map and put the one with the new style on it. However, this approach causes me problems of slowness when I remove and add, in fact it seems that the callback freezes, the earth disappears, and after about 10 seconds it resumes and manages the new tiles. I also tried to flag setAsyncLoading(true), but it doesn't improve the situation. Thanks for the support. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm not sure if this will work for WMS, but instead of removing/adding layers you can also try the invalidate API: std::vector<const Layer*> layers;
layers.push_back(your_wms_layer);
GeoExtent extent;
mapNode->getTerrainEngine()->invalidateRegion(layers, extent); This tells the terrain engine to re-load all the tiles from those layers in that extent. |
Beta Was this translation helpful? Give feedback.
I'm not sure if this will work for WMS, but instead of removing/adding layers you can also try the invalidate API:
This tells the terrain engine to re-load all the tiles from those layers in that extent.