Select to view content in your preferred language

Reg : legends for Silverlight Application

911
5
11-10-2010 11:12 AM
VikramS
Frequent Contributor
Hi all ,

Can we able to get the symbols used in arcmap for the layers in legend tool of Silverlight 2.1 version ? If not , HOw can i set graphics to my layer in mxd . Help me with this regard ...
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
For an ArcGISDynamicMapService layer, the legend symbols are coming from the renderers defined in ArcMap (either by the new 10SP1 legend service or by the arcgis.com legend service).

So, the legend in the web client is supposed to be very close of the symbols you see in the ArcMap TOC.

If, for any reason, you want to get the images in your client application, you can access to the legend items tree by using, as starting point, the 'LayerItems' property of the legend control.  From a layerItem, you can access the collection of LegendItems which gives you the ImageSource (and the Label) of the legend item.
0 Kudos
KirkKuykendall
Deactivated User
I can't get the 2.1 simple legend sample to work with this url:
http://map.floridadisaster.org/GIS/rest/services/Facilities/Critical_Facilities/MapServer

It populates the root node, but not the rest of the tree.

Is this a bug?

Crossposted here.
Thanks!
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I didn't reproduce your issue.

I tested your code and got the attached result.

Could you give more info on how to reproduce it? (browser, OS, ....)

Note also that with Fiddler, I can see this request to arcgis.com legend end point:
http://www.arcgis.com/sharing/tools/legend?soapUrl=http://map.floridadisaster.org/GIS/rest/services/...
Do you see it?
0 Kudos
KirkKuykendall
Deactivated User
Hi dbroux-

Thanks for the reply. The app I'm working on is on a server sitting behind a firewall.

Based on what you said in another thread:

It means that, with map services prior to 10SP1, arcgis.com must be able to access to your map service in order to return the swatches.


I'll need to upgrade any internal mapservices to 10sp1 in order for legends to work, correct?
0 Kudos
DaveTimmins
Deactivated User
That is correct
0 Kudos