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(); }
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.