POST
|
Is it possible to provide SSO to the arcgis.com portal for an organistation using eg OpenID or SAML? thx
... View more
06-28-2018
10:38 AM
|
0
|
1
|
378
|
POST
|
Hi Antii, Never mind the last question I figured it out, u need to call ApplyEditsAsync to update the service. This is what I have so far: static void Main(string[] args) { var featureTable = new ServiceFeatureTable(new Uri("https://services7.arcgis.com/yixziXsHssbXEWl5/ArcGIS/rest/services/grex/FeatureServer/0")) {Credential = new ArcGISTokenCredential()}; ((TokenCredential) featureTable.Credential).Token = GetToken().access_token; var queryParams = new QueryParameters {WhereClause = "DeelplanId = 666"}; //this will return max 2000 features var queryResult = featureTable.QueryFeaturesAsync(queryParams); queryResult.Wait(); var features = queryResult.Result.ToList(); foreach (var feature in features) { if (CheckIfFeatureNeedsUpdate(feature)) { ((ArcGISFeature)feature).LoadAsync().Wait(); feature.Attributes["Kosten"] = 663584d; //...update all other attributes featureTable.UpdateFeatureAsync(feature).Wait(); } } featureTable.ApplyEditsAsync().Wait(); Console.ReadKey(); } Is this the right way (from a design point of view ) to sync approximately 2000 records each day? Or is there a better more efficient way? grt and thx again!
... View more
05-23-2017
02:59 PM
|
0
|
0
|
1323
|
POST
|
Hi Antti, Yes that helped But now the next problem: I call featureTable.UpdateFeatureAsync(features[0]).Wait(); after I set the new value but nothing happens: I don't see any request being made to the arcgis server and it doesn't raise an error as well. So how do I update the server with the new values? thx again!
... View more
05-23-2017
01:38 PM
|
0
|
1
|
1323
|
POST
|
I'm trying to update the attributes of a feature layer through .Net. But I keep getting this error message: "Cannot call this method in this context: You must load the feature before editing." Here is my code: static void Main(string[] args) { var featureTable = new ServiceFeatureTable(new Uri("https://services7.arcgis.com/yixziXsHssbXEWl5/ArcGIS/rest/services/grex/FeatureServer/0")) {Credential = new ArcGISTokenCredential()}; ((TokenCredential) featureTable.Credential).Token = GetToken().access_token; var queryParams = new QueryParameters {WhereClause = "DeelplanId = 666"}; // Query the feature table var queryResult = featureTable.QueryFeaturesAsync(queryParams); // Cast the QueryResult to a List so the results can be interrogated queryResult.Wait(); var features = queryResult.Result.ToList(); features[0].SetAttributeValue("Kosten", 3562); Console.ReadKey(); } It fails on the SetAttributeValue, although I see the attributes are loaded from the server. Any idea?, thx!
... View more
05-23-2017
01:08 AM
|
0
|
4
|
2826
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|