Select to view content in your preferred language

draw labels on featurelayer

671
3
02-24-2012 12:38 PM
ChrisBradberry
Deactivated User
Hey,

I can't seem to get the polygon labels to draw on my featureservice.  The service draws, but the labels do not.  Is is possible to render labels with a feature service?

Thanks, Chris
0 Kudos
3 Replies
SanajyJadhav
Deactivated User


Is is possible to render labels with a feature service?



It is not.

To get labels for the layer in the FeatureService, we did following.
1. Called http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Geom... method to get label location whenever extent is changed.
2. At these points, we drew text graphics.

Its costly operation, but it works.

hope this helps.
0 Kudos
DaveTimmins
Deactivated User
You can create a symbol template to show the label based on the attribute value, there is a related thread at http://forums.arcgis.com/threads/22169-Custom-Marker-Symbol-with-Labels

Cheers,
0 Kudos
DominiqueBroux
Esri Frequent Contributor
You can also look at this sample which is a tentative to add labels on the fly to symbols provided by the service.
0 Kudos