[GIS] Return symbols for geometries from Dynamic Service Layer

arcgis-silverlight-api

I'm using the ESRI Silverlight API and I've got a question regarding tasks such as identifies and queries that return geometry from a Dynamic Service Layer. These tasks return graphic geometry but no symbol, so in order to display that graphic in another GraphicsLayer, I have to have a symbol setup client side and then assign that symbol to the graphic. What I'm wondering is if there is any way to not only pull back the geometry from the Dynamic Service, but also pull back symbols?

The only approach I've been able to come up with is to access the FeatureLayer via the REST endpoint and pull back it's renderer to assign it to my GraphicsLayer. This works, but limits me to only the symbols specified in the Dynamic layer (I can't use a single graphics layer for results from multiple Feature Layers). This also seems fairly complicated to get to where I'm wanting to be.

I'm thinking there might not be any way to do this, but wanted to ask and see if anyone has any ideas. Thanks!

Best Answer

Depending on the complexity of the symbol, you could hit query the REST end point with a WebClient request. Then you can parse the Json text that's returned. From that you can create a symbol and assign it to each graphic before adding it to the graphics layer.

http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/ http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/fslayer.html

Related Question