Labels

837
4
05-23-2011 07:34 AM
AndyBurnell
New Contributor III
Hi I was wondering if there is an easy way to add a button in the layer list to turn on/off labels? I have 11 layers in my map containing many entries. I would like the user to be able to control when the label is displayed.

Thanks,

Andy
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor
How are you adding labels on your layer?
0 Kudos
AndyBurnell
New Contributor III
My labels are turned on through the layer properties in my MXD file. I know that I could create annotation layers but I wanted to keep the web map clean. I was just wondering if there was some control that I could add that would allow this.
0 Kudos
JenniferNery
Esri Regular Contributor
Our API does not support labelling and annotations. But you could use GraphicsLayer with MapPoints that use TextSymbol that binds to an attribute http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML. If your layer contain polygon, you can use LabelAsync to get a good label position. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LabelPoints
0 Kudos
AndyBurnell
New Contributor III
Thank you very much for the info and timely responses.


Andy
0 Kudos