1

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!

2 Answers 2

1

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

0

> if there is any way to not only pull back the geometry from the Dynamic Service, but also pull back symbols?

You could try using the Dynamic layer as the background, and a Feature Layer in Selection mode to display the results of the query. This sample might give some pointers.

> 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

Rather than using a graphics layer, the results would be returned as a feature layer, containing the renderer.

2
  • Thanks, I like that as an alternate solution. It still doesn't allow me to include graphics from multiple dynamic layers in one client side layer, but at least it is an easy work around for filtering.
    – Spencer
    Commented Aug 17, 2011 at 21:12
  • To include graphics from multiple dynamic layers in one client side layer, you could run a set of QueryTasks, and load the results of each into a single graphicsLayer. This doesn't solve the problem with the renderer, though, so you're back where you started :) Commented Aug 17, 2011 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.