mobileCache1.DeleteCache(); MobileCacheSyncAgent mobilesync = new MobileCacheSyncAgent(mobileCache1, mobileServiceConnection1); MobileCacheSyncResults mobileResults = new MobileCacheSyncResults(); mobileServiceConnection1.CreateCache(mobileCache1); mobileCache1.Open(); try { FeatureLayerSyncResults featLayerResults = new FeatureLayerSyncResults(); //layer de parcelas FeatureLayerSyncAgent flsa1 = mobilesync.SyncAgents[0] as FeatureLayerSyncAgent;//new FeatureLayerSyncAgent(fl1,mobileServiceConnection1); flsa1.SynchronizationDirection = SyncDirection.DownloadOnly; flsa1.DownloadFilter = new QueryFilter("(cd_uso_solo in (140161,139115,139134))"); featLayerResults = flsa1.Synchronize() as FeatureLayerSyncResults; //featLayerResults.FeaturesAddedInCache.Count; //layer uso solo FeatureLayerSyncAgent flsa2 = mobilesync.SyncAgents[1] as FeatureLayerSyncAgent;//new FeatureLayerSyncAgent(fl2, mobileServiceConnection1); flsa2.SynchronizationDirection = SyncDirection.DownloadOnly; flsa2.DownloadFilter = new QueryFilter("(cd_parcela in (572862,572861,549839))"); featLayerResults = flsa2.Synchronize() as FeatureLayerSyncResults; //featLayerResults.FeaturesAddedInCache.Count; } catch (Exception ex) { MessageBox.Show("Cannot synchronize with this service :" + ex.Message); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.