How to get WFS to update in map in AGP 2.4.2?

1778
4
12-09-2019 12:47 PM
josephbard
New Contributor II

Hi, 

I've connected to a WFS (and WMS with the same source data) and successfully added the data to my map. However, when the WFS data is updated at the source, the WFS update didn't propagate to my map. I tried refreshing the service (Servers tab in the Catalog pane), I tried adding the WFS to a new map (same project), still no luck. Strangely, the old WSF bounding box was clipping the WMS which did update (attached image). Finally, when I restarted AGP the WFS updated in a map.

However this is less than ideal if you wish to work with dynamic data.

Is there a fix for this aside from restarting AGP? 

0 Kudos
4 Replies
JillianPenney
Esri Contributor

By default, the WFS layer works in a cached mode (called snapshot mode) when added to the map. The cache will be used when that layer is added to any map within that ArcGIS Pro session. To get the updated data, there are a couple of options:

  1. Close and reopen Pro - the cache will be deleted upon closing Pro and a new cache will be generated
  2. Switch to On Demand mode - Right-click the layer > Properties > WFS > choose On demand in the Connection Mode section. If your service is not compatible with on demand mode, you can switch back to Snapshot mode which will still refresh the cache.
josephbard
New Contributor II

Jillian,

Thanks for the great info! I'll try this immediately but will have to wait for the update to know the results.

I have a follow up question about other settings, after looking at the properties a little more, would selecting the Right-click the layer > Properties > Cache >"Don't cache any data locally" setting (or the automatic cache clearing function every x minutes) be useful here as well? 

0 Kudos
josephbard
New Contributor II

Jillian, 

Another question-- How can you tell if the service is compatible with on demand mode? Is it as simple as later versions, e.g 2.0 are while earlier version are not? Or is there a specific service parameter that controls caching vs on demand?

Thanks!

0 Kudos
JillianPenney
Esri Contributor

The on demand mode uses some complex filters to send requests to the WFS server to load data as you pan around the map. So long as the service provider supports these filters, the service should work in Pro in on demand mode. We have found that not all implementations of WFS have support for complex filters, so we use the cached mode by default to try and be more compatible with most implementations. The on demand mode in Pro does only support version 1.1.0 and 2.0.0 of WFS, version 1.0.0 will only work in the snapshot mode. 

As for your first question, the WFS properties are honored separately from the Cache tab so the connection mode setting would need to be updated on the WFS properties page.