Select to view content in your preferred language

FeatureLayer with Label

1799
1
03-16-2012 12:48 AM
SantoshV
Emerging Contributor
HI,

I have a project where I create a  FeatureLayer from a service

FeatureLayer featureLayer = new FeatureLayer();
                featureLayer.Url = "http://myserver/ArcGIS/rest/services/LRS_CW_SURFACE_TYPE/MapServer/0";
                featureLayer.ID = "QueryResult";
                featureLayer.OutFields.Add("DESCRIPTION,START_KM,END_KM");
                
                featureLayer.InitializationFailed += new EventHandler<EventArgs>(featureLayer_InitializationFailed);
                featureLayer.Initialize();
                mainPage.map.Layers.Add(featureLayer);
                featureLayer.UpdateCompleted += new EventHandler(featureLayer_UpdateCompleted);
                featureLayer.UpdateFailed += new EventHandler<TaskFailedEventArgs>(featureLayer_UpdateFailed);


in the mxd from which I created the service I have made the label visible to the map..
then when I create a new Feature-layer why am I not able to get the label as in the mxd
also the feature point created in the feature-layer label looses it rotation angle
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
I not able to get the label as in the mxd
also the feature point created in the feature-layer label looses it rotation angle


Please look at this sample which is a tentative to manage label and rotation from a field.
0 Kudos