Showing Label on Map

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0, WinForms Controls
Apr 28, 2014 at 8:22 AM
Edited Apr 29, 2014 at 3:26 AM
Hello ;

Is there a way to display the names of electorates in Map . I've written this piece of code , its is working for a specific point . I need to display names of all of the electorates.

SharpMap.Data.Providers.ShapeFile oshape=new SharpMap.Data.Providers.ShapeFile(shp);
NetTopologySuite.Geometries.Point gPoint = new NetTopologySuite.Geometries.Point(ptX, ptY);
var fds = new SharpMap.Data.FeatureDataSet();
vlayer.DataSource.ExecuteIntersectionQuery(gPoint, fds);
FeatureDataTable fdt1 = new FeatureDataTable();
fdt1 = fds.Tables[0];
SharpMap.Layers.VectorLayer vlayerLBL = new SharpMap.Layers.VectorLayer("vlayer");
vlayerLBL.DataSource = new GeometryFeatureProvider(fdt1);
SharpMap.Layers.LabelLayer lbl = new SharpMap.Layers.LabelLayer("lbl");
lbl.DataSource = vlayerLBL.DataSource;
lbl.LabelColumn = fdt1.Columns[1].ToString();