Hey,
I have a FeatureLayer in my map, and it displays polygons. I'm using the ArcGIS Maps SDK for JavaScript to display the map. However, when I change the shape of a polygon in ArcGIS Pro, the shape gets updated in the service, but it doesn't reflect in the map, unless I clear the browser cache.
Is there a way to force the feature layer to refresh and display the updated geometry in the map without clearing the cache?
Solved! Go to Solution.
Technically yes, but it's not pretty. Despite the workflow being different, the basic problem and its solution are described in this thread. In your workflow, you just want the layer to draw the changes. What makes these similar is that the layer is doing the same kind of query operation seen in that thread in order to retrieve the data and draw it on the map. The only way I know of to alter this workflow and insert a where clause is to use a RequestInterceptor. A recent thread involving the use of those is here.
Technically yes, but it's not pretty. Despite the workflow being different, the basic problem and its solution are described in this thread. In your workflow, you just want the layer to draw the changes. What makes these similar is that the layer is doing the same kind of query operation seen in that thread in order to retrieve the data and draw it on the map. The only way I know of to alter this workflow and insert a where clause is to use a RequestInterceptor. A recent thread involving the use of those is here.
The query was altered to include an equal statement: current_rnd = current_rnd, where current_rnd is a new random number everytime the query is created. And it works 😊