Select to view content in your preferred language

Symbology for Geoprocessing Results in a Graphics Layer

920
1
Jump to solution
08-30-2012 10:54 AM
JustinShepard
Deactivated User
I am using a custom extension to run a geoprocessing task and adding the results to the map using MapApplication.Current.Map.Layers.Add(newGraphicsLayer);. The features that I added to the newGraphicsLayer show up so it's populating okay. The problem is getting the symbology set. Here is what I've tried (none of these gave me what I want):

1. define the symbology in my .xaml file resources and then refer to that in my code-behind when creating the graphic. When that does work it draws correctly on the map but the legend can't figure out what to do with it so the layer is added to the Map Contents but the symbology is not.

2. Don't set any symbology. This works for both displaying on the map and in the Map Contents, but I need to be able to change the symbols. My guess is that the Map Contents is looking in the ArcGIS Mapping Symbols library.

3. Can't figure out how to reference the symbols library.

How do I reference the ArcGIS Mapping Symbols library in my code? It must be coming through as a resource for the map somehow. The follow up to that question is does it read all symbols in that library so that I could write our custom symbols and upload them to the library?

Any samples would be great. I was looking through the online esri samples and I couldn't find where they set symbology. Looks like they just let it default when returning results.
0 Kudos
1 Solution

Accepted Solutions
JustinShepard
Deactivated User
Solution: use a renderer http://resources.arcgis.com/en/help/sharepoint/concepts/index.html#/Best_practices_Graphics_layers_s...

Unfortunately just setting the symbology without first using a renderer is one of those cases were it draws correctly and doesn't return an error, but the result is odd and inconsistent behavior.

View solution in original post

0 Kudos
1 Reply
JustinShepard
Deactivated User
Solution: use a renderer http://resources.arcgis.com/en/help/sharepoint/concepts/index.html#/Best_practices_Graphics_layers_s...

Unfortunately just setting the symbology without first using a renderer is one of those cases were it draws correctly and doesn't return an error, but the result is odd and inconsistent behavior.
0 Kudos