What is the proper way to display line graphics in a workflow?
We are using the UpdateGraphicsLayer activity to try to "highlight" a featureset of line features. It doesn't seem to be showing anything for us. We are naming the layer "circuitChooserGraphics" but that layer never shows up in the list of map layers. To double check we called the GetGraphicsLayerContent activity to grab up the featureset of graphics and logged out the Count of them to make sure it was the same number of features we gave to the UpdateGraphicsLayer. It was. So it is adding the features to the graphics layer and we can pull them out of the layer, but it never displays them. We think we have it narrowed down to the Renderer we are setting. Does anyone see a problem with our SimpleLineSymbol based renderer?
New ESRI.ArcGIS.Client.SimpleRenderer() With
{
.Symbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol() With
{
.Color = System.Windows.Media.Colors.Cyan,
.Width = 2.0,
.Style = STYLE_SOLID
}
}
We also tried it this way with no joy:
New ESRI.ArcGIS.Client.SimpleRenderer() With
{ .Symbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol() With
{ .Color = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Lime),
.Width = 10.0,
.Style = Esri.ArcGIS.Client.Symbols.SimpleLineSymbol.LineStyle.Solid
}
}
0
-
Hi Josh,
The Graphics layers are not added to the layer list. The renderer you are specifying looks correct. Have you confiremed that they have geometries?
The following renderer is foolproof for testing.
New ESRI.ArcGIS.Client.SimpleRenderer() With { .Symbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol(System.Windows.Media.Colors.Cyan, 2.0) With { .Style = ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol.LineStyle.Solid } }
-Kevin0 -
Thanks for double checking our renderer code. It turns out the problem was way back in a previous step where we were using a QueryLayer activity and forgot to put in a Spatial Reference. Once we put in the Web Mercator there the graphics showed up! So it would seem that it was adding the features to the graphics layer only they were out in the ocean somewhere instead of on top of the features we were expecting to see.
_img_ alt="Green graphics showing now" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000fxyq&feoid=Body&refid=0EMf2000000kA4j" _/_img_0
Please sign in to leave a comment.
Comments
2 comments