Parameters
- map
- The map whose replicas will be removed.
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
System.ArgumentNullException | Map cannot be null |
System.InvalidOperationException | Map has no syncable content |
//namespace ArcGIS.Desktop.Mapping.Offline var extent = MapView.Active.Extent; var map = MapView.Active.Map; //await if needed... QueuedTask.Run(() => { //Check map has local syncable content //Either.. //var canSyncContent = GenerateOfflineMap.Instance.GetCanSynchronizeReplicas(map); //Or...both accomplish the same thing... var canRemove = GenerateOfflineMap.Instance.GetCanRemoveReplicas(map); if (canRemove) { //Remove Replicas - any unsync'd changes are lost //Call sync _first_ to push any outstanding changes if //needed. Local syncable content is re-sourced //to point to the service GenerateOfflineMap.Instance.RemoveReplicas(map); } });
Target Platforms: Windows 11, Windows 10