Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

> 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.

share|improve this answer
    
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 Aug 17 '11 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 :) –  Stephen Lead Aug 17 '11 at 22:51
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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