Select to view content in your preferred language

Legend & Dynamic layer symbolization

612
5
08-06-2012 12:56 AM
MiriEshel
Esri Contributor
Hi,

I have an application with a dynamic layer (contains about 20 layers).
I want to symbolize dynamically one of its layers.
I looked at the sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#DynamicLayerThematic that creates a FeatureLayer based on a layer in the dynamic layer.
The thing is, that in the legend, the FeatuerLayer legend is added in addition to the legend of the dynamicLayer (as expected).
I want to replace the symbolization of the layer in the dynamicLayer.

Is it possible and how? (I guess it's not possible but I ask anyway because the client had ArcIMS before and he is used to this ability).

Does the dynamic legend (in the REST API) can help in any way? (I couldn't figure out exactly what it does).

If it's not possible, is it possible to add group layers to the legend under which all the symbolized feature layers will reside?

Thanks a lot,
Miri
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
You can reorganize legend layer items on event Legend.Refreshed.

I created a sample demonstarting how we can move the feature layer item from the root to the hierarchy of the dynamic layer items.

Hope this helps.
0 Kudos
MiriEshel
Esri Contributor
Hi Diminique,

Thanks so much for creating a sample that feets our needs.

Indeed it does what it suppose to do but I wonder how can I take advantage of the dynamic layer (a new feature in 10.1 : http://resources.arcgis.com/en/help/main/10.1/index.html#/About_dynamic_layers/00sq000000n1000000/) ?
I thought this could be the option to use somehow, instead of adding a featurelayer and replace the location of the dynamicLayer's layer with this featureLayer.

Thanks a lot,
Miri
0 Kudos
ModyBuchbinder
Esri Regular Contributor
Hi again,

I looked at the dynamicLayers sample : http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#DynamicLayerThematic
and it looks like it also adds a FeatureLayer but instead of giving a Url, it uses Url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/dynamicLayer" and  <esri:LayerMapSource MapLayerID="3"/>

Which way is better? 

Thanks a lot,
Miri
0 Kudos
JenniferNery
Esri Regular Contributor
The same description for layer applies even on dynamic ones: http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client~ESRI.Arc.... ArcGISDynamicMapServiceLayer with dynamicLayers, will perform the rendering on the server-end and return you an image on-the-fly. FeatureLayer with dynamic source, will still return you the features, their geometry and attributes and apply the renderer on client. I guess it depends where you want the processing to take place, if you need the features available on the client then go with FeatureLayer.
BTW, Dominique, great samples! 🙂
0 Kudos
ModyBuchbinder
Esri Regular Contributor
Hi Jennifer,

Thanks, now I understand. I was confused because also the dynamic layer is defined as esri:FeatureLayer.

I join you opinion about Dominique's samples....

Thanks again,
Miri
0 Kudos