POST
|
Is there an easy way to generate the JSON for a symbol renderer. For example, can I automatically generate the symbol JSON from a layer file for symbology that we have already defined via ArcMap? I can update the renderer for a loaded FeatureLayer with something similar to the following. Renderer ren = Renderer.FromJson(File.ReadAllText(symbolJson)); loadedLayer.Renderer = ren; Symbol JSON is similar to the following { "type": "uniqueValue", "field1": "SUBTYPECD", "field2": "WORKFUNCTION", "field3": null, "defaultSymbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 156, 156, 156, 255 ], "width": 1 }, "defaultLabel": "<all other values>", "uniqueValueInfos": [ { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 0, 0, 255 ], "width": 0.5 }, "value": "1,30", "label": "Primary Bus Bar, In Service", "description": "" }, { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 0, 0, 255 ], "width": 0.5 }, "value": "1,5", "label": "Primary Bus Bar, In Service", "description": "" }, { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 0, 0, 255 ], "width": 1 }, "value": "2,30", "label": "Secondary Bus Bar, In Service", "description": "" }, { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 0, 0, 0, 255 ], "width": 1 }, "value": "2,5", "label": "Secondary Bus Bar, In Service", "description": "" }, { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 255, 0, 0, 255 ], "width": 1 }, "value": "1,0", "label": "Primary Bus Bar, Proposed - Install", "description": "" }, { "symbol": { "type": "esriSLS", "style": "esriSLSSolid", "color": [ 255, 0, 0, 255 ], "width": 0.5 }, "value": "2,0", "label": "Secondary Bus Bar, Proposed - Install", "description": "" } ], "fieldDelimiter": "," }
... View more
07-23-2019
12:01 PM
|
3
|
1
|
1120
|
POST
|
Hi Shane, Here is how I did it. //Load the layers from our local geodatabase function loadLayers(){ if (gdbPath) { var gdbtables = gdb.geodatabaseFeatureTables; for(var i in gdbtables) { var newFeatureLayer = ArcGISRuntime.createObject("FeatureLayer"); newFeatureLayer.featureTable = gdbtables; map.insertLayer(newFeatureLayer, 1); } } } Geodatabase { id: gdb path: gdbPath }
... View more
03-17-2016
02:02 PM
|
0
|
0
|
274
|
POST
|
I'm interested in beginning to test out the AppStudio functionality, but I'm confused on whether I can also write some of the business logic in C++ as well when using AppStudio. When I try to add C++ files to an AppStudio project in Qt Creator, it throws errors (Failed to add one or more files to project). Forgive me for this question if the answer is quite simple, I have just started playing around with AppStudio. Basically I'm just looking to understand what my limitations are regarding C++ coding if utilizing AppStudio.
... View more
03-14-2016
11:59 AM
|
0
|
2
|
3281
|
POST
|
Hi Jose, Depends on what you mean by connect I suppose. I put two samples below that should work. Once simply adding the ArcGIS Server layer to a current map view, and another querying against an ArcGIS Server layer. //Add a new dynamic map service layer. Replace the URL with your desired ArcGIS Server rest URL. //Use ArcGISTiledMapServiceLayer if it is a tile map service instead. var layer = new ArcGISDynamicMapServiceLayer(new Uri("http://MyServer/arcgis/rest/services/MyService/MapServer")); await layer.InitializeAsync(); //add the layer to the map and zoom to its extent this.MyMapView.Map.Layers.Add(layer); If by connect you mean you just want to query against the layer, then you'll want to use a QueryTask. QueryTask myQueryTask = new QueryTask(new Uri("http://MyServer/arcgis/rest/services/MyService/MapServer/0")); Query myQuery = new Query("OBJECTID < 100"); OrderByField myOrder = new OrderByField("OBJECTID", SortOrder.Ascending); myQuery.OrderByFields.Add(myOrder); myQuery.ReturnGeometry = true; myQuery.OutFields.Add("OBJECTID"); myQuery.OutFields.Add("GLOBALID"); QueryResult myResult = await myQueryTask.ExecuteAsync(myQuery);
... View more
02-05-2016
09:32 AM
|
0
|
0
|
1703
|
POST
|
Hi Antti, Yep, here are the reproduction steps. Can do this with any data. 1) Create symbology based on multiple fields. 2) Choose File -> Share As -> ArcGIS Runtime Content 3) Click on the Analyze button and see that the layer symbology is not supported.
... View more
11-26-2015
01:00 PM
|
0
|
1
|
1474
|
POST
|
Any indication on when / if this will be supported for creating ArcGIS Runtime Content? Currently I'm working around this by creating multiple layers in my Mxd for the same feature class with definition queries to simulate the behavior, but it would be nice to have this symbology type supported.
... View more
11-23-2015
09:27 AM
|
1
|
9
|
4700
|
POST
|
Hi Jeremy, That's been my experience so far. Unless I'm missing something, definition queries are not yet support with the creation of the runtime content. Currently I keep track of the definition queries in a configuration file and apply them during the loading of the map in the mobile application. FeatureLayer fLayer = layer as FeatureLayer; fLayer.DefinitionExpression = "SUBTYPECD = 2"; Seems like some extremely core functionality that they are missing here.... I'm using the 10.2.6 runtime and I generate the .geodatabase file in ArcMap 10.3.1. Kind Regards, Kris Foster
... View more
11-23-2015
09:15 AM
|
0
|
0
|
278
|
POST
|
Hi Morten, Thanks for the answer! Can you tell me if there any plans to support animated symbols in a future release? Kind Regards, Kris Foster
... View more
01-16-2015
02:14 PM
|
0
|
2
|
877
|
POST
|
Previously I have been able to define control templates for line symbols in the xaml to animate lines. The below for example provided a moving dashed line to indicate a direction of the line with an animated graphic rather than a simple arrow marker symbol. <Grid.Resources>
<esriSymbols:LineSymbol x:Name="TestLineSymbol">
<esriSymbols:LineSymbol.ControlTemplate>
<ControlTemplate>
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard RepeatBehavior="Forever">
<DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="Element"
Storyboard.TargetProperty="StrokeDashOffset"
To="1000" Duration="0:0:0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Path x:Name="Element" Stroke="{Binding Symbol.Color}" StrokeThickness="{Binding Symbol.Width}" StrokeEndLineCap="Round" StrokeStartLineCap="Round"/>
</Grid>
</ControlTemplate>
</esriSymbols:LineSymbol.ControlTemplate>
</esriSymbols:LineSymbol>
</Grid.Resources> Does anyone have any suggestions on how to implement similar functionality now?
... View more
01-15-2015
09:44 AM
|
0
|
4
|
5011
|
POST
|
Does anyone else have issues with having both of these installed on the same server. I had ArcGIS 10.2.1. for Desktop installed and had been running many python scripts for some geoprocessing. All geoprocessors were working without issues until I installed ArcGIS 10.2.1 for Server. Now all of the geoprocessors that were running prior no longer work. Is there something I need to modify in the python scripts to allow them to function on a server with both of these installed? For example I have a python script that drops fields from many feature classes (arcpy.DeleteField_management). When I run it from my server with both installed it fails with the following. "Failed to execute. Parameters are not valid. ERROR 000732: Input Table: "TableName" does not exist or is not supported." If I copy the python script and sde data connection file to another server with only ArcGIS 10.2.1 for Desktop installed it works without issue. I also have another python script that uses the following: fcList = arcpy.ListFeatureClasses() for fc in fcList: It throws the error: TypeError: 'Nonetype' object is not iterable. Again though I can copy the sde connection file and python to another server with only ArcGIS 10.2.1 for Desktop installed and everything works properly. I have also replicated the python failures on another server that has both installed.
... View more
12-16-2014
08:51 AM
|
0
|
2
|
2707
|
POST
|
Hi Antti, I've sent the geodatabase your way in a separate email. Thanks! Kind Regards, Kris Foster
... View more
11-13-2014
07:26 AM
|
0
|
0
|
538
|
POST
|
FYI for Esri and anyone else that may run into this error. Databases: Sql Server 2012 and Oracle 12.1.0.2 Exporting to runtime content in ArcGIS Desktop 10.3.0.4284 succeeds with one single point feature layer, but when loading the created .geodatabase file into ArcGIS runtime 10.2.4 results in the error "Non-convertible value type in convert" at the following line. Geodatabase database2 = (await Esri.ArcGISRuntime.Data.Geodatabase.OpenAsync(DatabasePath)); Steps that reproduce: 1) Add a point feature layer in ArcMap 2) Open the layer properties for it 3) Select the display tab 4) In the Display Expression section for the Field selection choose "Object ID". 5) Share As -> ArcGIS Runtime Content The analyze does not flag anything as wrong with either error or warning, but as stated the geodatabase won't load in the runtime. It may be reproducible with other feature class types / tables but I haven't tested them.
... View more
11-12-2014
07:46 PM
|
0
|
2
|
4066
|
POST
|
Yea I'm running into this bug as well. For testing purposes I will be trying to get a python script that will rename domains without spaces, but definitely hope this one will be patched quickly as the database I'm working on has 300+ domains with spaces in the names.
... View more
11-07-2014
01:51 PM
|
2
|
4
|
414
|
Title | Kudos | Posted |
---|---|---|
3 | 07-23-2019 12:01 PM | |
1 | 11-23-2015 09:27 AM | |
2 | 11-07-2014 01:51 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|