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); }
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.