Labelling feature layers from ArcGIS Server 10

Discussion created by lisardggy on Sep 1, 2011
Latest reply on Sep 6, 2011 by JNery-esristaff
Good morning.

I have an ArcGIS 10.0 server that defines several feature layers. In my WPF application, I want to add labels on the map for the feature layers, the same way I can in the ArcClient.
From previous topics such as this I gather than the WPF control doesn't support this out of the box, so I tried to implement it myself:

  • I catch each layer's UpdateComplete event, after the graphics are all loaded.

  • I then send the list of graphics to the GeometryServer using the GeometryTask's LabelPoint service, receiving a list of points.

  • I then create a new TextSymbol for each point, settings its text to the original graphic's DisplayField's content.

  • I then add the LabelPoint I received into the layer's Graphics collection.

For some reason, though, nothing comes up. No text. No symbols. No errors either, just nothing on the map. I tried calling Refresh() on the FeatureLayer, but that didn't work either. Am I going about this wrong? Is there a simpler method that I missed?