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
|
2
|
1
|
251
|
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
|
10
|
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
|
2704
|
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
|
17
|
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
|
33
|
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
|
3259
|
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
|
8
|
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
|
28
|
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
|
4162
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|