mobileCache = new MobileCache("put your path here the folder that contains the cache"); MobileServiceConnection con = new MobileServiceConnection(); con.Url = (@http:// + ServerType._StaticArcGISServerName + "/arcgis/services/Mobile_Services/" + AppSettings._StaticSynchronizationName + "/MapServer/Mobileserver"); con.CreateCache(mobileCache.StoragePath); mobileCache.Open(); foreach (Layer layer in mobileCache.Layers) { FeatureLayer featureLayer = (FeatureLayer)layer; FeatureLayerSyncAgent layerSyncAgent = new FeatureLayerSyncAgent(featureLayer); layerSyncAgent.MapDocumentConnection = con; layerSyncAgent.SynchronizationDirection = SyncDirection.UploadOnly; SyncResults theSyncResults = new SyncResults(); theSyncResults = layerSyncAgent.Synchronize(); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.