POST
|
Have anyone been using ArcGIS UniqueValueRenderer on attribute fields of type GUID? I've created a UniqueValueRenderer that has a default symbol. If I do: renderer.Fields.Add("OBJECTID"); or renderer.Fields.Add("textfield"); // Field of type text it works as expected. The features are rendered with the default symbol. (I haven't added any specific values to the UniqueValuesInfoCollection yet). But if I change the code to: renderer.Fields.Add("guidfield"); // Field of type GUID the output is blank.. None of the features are being displayed. Seems like the code crashes or something, producing no result for the map to display. I've looked at the log files on the server, but haven't found anything there.. Anyone have a clue what might be wrong?
... View more
04-20-2015
11:50 PM
|
0
|
0
|
3126
|
POST
|
Have anyone been using ArcGIS UniqueValueRenderer on attribute fields of type GUID? I've created a UniqueValueRenderer that has a default symbol. If I do: renderer.Fields.Add("OBJECTID"); or renderer.Fields.Add("textfield"); // Field of type text it works as expected. The features are rendered with the default symbol. (I haven't added any specific values to the UniqueValuesInfoCollection yet). But if I change the code to: renderer.Fields.Add("guidfield"); // Field of type GUID the output is blank.. None of the features are being displayed. Seems like the code crashes or something, producing no result for the map to display. I've looked at the log files on the server, but haven't found anything there.. Anyone have a clue what might be wrong?
... View more
04-16-2015
01:31 AM
|
0
|
0
|
2459
|
POST
|
I found the answer while using Wireshark to look at the web request being sent to ArcGIS server. It never sent any attribute updates, until I put the fields I tried to update into table.OutFields..
... View more
02-03-2015
02:24 AM
|
1
|
0
|
609
|
POST
|
Hi all, I am trying to update feature attributes from a .NET application that I'm working on. I've cleaned the code down to the following example: string serviceUrl = string.Format("http://***.cloudapp.net/arcgis/rest/services/{0}/{1}/FeatureServer", "***", "Test"); string featureUrl = string.Format("{0}/{1}", serviceUrl, "0"); var table = await ServiceFeatureTable.OpenAsync(new Uri(featureUrl)); if (table.IsInitialized) { var found = await table.QueryAsync(1); if (found != null) { found.Attributes["testtext"] = "test"; await table.UpdateAsync(found); if (table.HasEdits) { var result = await table.ApplyEditsAsync(); } } } It finds the feature with OBJECTID = 1, table.HasEdits is true after the update, and the result variable contains a ResultItem in the UpdateResults property, with no errors and Success = true. So no errors and no indication something went wrong, but the attribute table in ArcGIS doesn't change at all. If I try to change the geometry of the feature, by adding a line like this: found.Geometry = new Polygon(new List<MapPoint> { new MapPoint(0, 0), new MapPoint(-5, 0), new MapPoint(-5, -5), new MapPoint(0, -5), new MapPoint(0, 0) }); It will update the geometry correctly... but still no update to the other attributes of the feature. The feature class in question here, has a field called "testtext" which is of type "Text". I've also tried fields with type short, double, date etc, but I'm still not able to update or add any attribute data. Any clues as to what I'm doing wrong here? I appreciate any help and tips... /Tormod
... View more
02-03-2015
12:11 AM
|
0
|
2
|
4409
|
POST
|
First of all, I am very new to the GIS world, so bear with me if the question is stupid. I have a feature class (let's call it Areas) storing polygons with some extra data (name, id etc). If I create a layer and publish this as a MapService, I can use it in my .NET application (or in the browser via REST) to display a layer containing all the Areas. In my app, I can even do filtering (with LayerDefinitions) to only display a certain area (feature) at a time. What I would like to do is (within the ArcGIS server, so that it is reflected on all clients) have one layer for each of the Areas in the feature table. So the REST directory in a browser would display: Layers: Areas Area 1 Area 2 Area 3 And I would be able to see the same structure in the TOC of the ArcGIS.com Map, and control visibility on/off on each of the Areas. The "projection" of turning every feature into a separate layer must be dynamic, so that if I add another Area, it would automatically become a new layer (ie. no configuration or manual republishing the MapService). Is this possible within ArcMap? Can I code it in Python and have it run inside the MapService somehow? Do I have to write a SOE ? Or isn't it possible at all (only on the client side)?
... View more
01-29-2015
11:02 PM
|
0
|
0
|
3817
|
Title | Kudos | Posted |
---|---|---|
1 | 02-03-2015 02:24 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|