Select to view content in your preferred language

Refreshing ArcGISDynamicMapServiceLayer

2418
2
04-03-2011 08:28 AM
MahshavaMahshava
Deactivated User
Hi,

I have an ArcGISDynamicMapServiceLayer with 20 vector layers.
When someone adds (or deletes) a feature to a layer (in code via ArcObjects, not REST API), I want to see the new feature on the Map automatically.

I've tried to use the methods:
ArcGISDynamicMapServiceLayer.Refresh() and
ArcGISDynamicMapServiceLayer.Initialize()
but they don't help me.

How can I make the Map to refresh in code and display the new feature (or remove the old one)?

Thanks!
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
'Refresh' should do the trick but  set 'DisableClientCaching' to true in order to avoid issue with images that could be in the browser cache.

Note : Check also that your map service is not cached else your modifications won't be taken into account before rebuilding the server cache.
0 Kudos
MahshavaMahshava
Deactivated User
Thanks, I set DisableClientCaching to true and it worked 🙂
0 Kudos