A question About show labels

Apr 23, 2011 at 2:30 AM
Edited Apr 23, 2011 at 2:30 AM

I want to show the NAME of the province .

my shp file : http://happystudy.info/wp-content/uploads/2011/04/res2_4m.zip

my code:

 FeatureSet fsProvince = new FeatureSet(); 

fsProvince.Open(mapPath + "china\\res2_4m.shp");

 fsProvince.Projection = mapMain.Projection;

  IMapFeatureLayer chinaProvince;

  lock (mapOperateLock)

   {

               chinaProvince = mapMain.Layers.Add(fsProvince); 

    }

   chinaProvince.LegendText = "City";  

   PointSymbolizer chinaProvincePointSymbolizer = new PointSymbolizer(Color.Red,DotSpatial.Symbology.PointShape.Ellipse,8);  

   chinaProvince.Symbolizer = chinaProvincePointSymbolizer;

   System.Drawing.Font lblfont=new System.Drawing.Font("Tahoma", 8.0f);

   mapMain.AddLabels((DotSpatial.Symbology.FeatureLayer)chinaProvince, "[NAME]", lblfont, Color.Black);            

But the name doesn't show well ,it includes other column of the attribute table.I don't konw why,can any one try it and tell me why and how to solve it?