This project has moved. For the latest updates, please go here.

get Feature data of a dynamic Point layer

Nov 2, 2010 at 1:10 PM


 I am create a layer by bellow coding:, it wil display point on the map. but when i want to click on a particular point, to show the attribute column data of the click point system gives error, Attribute data is not supported by the Geometry Provider" when executing an Intersection Query. Please help me to find out the result.

 // Add dynamic Point layer 

 FeatureDataTable fdt = new FeatureDataTable();


fdt.Columns.Add("MyAttributeColumn", typeof(String));



 FeatureDataRow fdr = fdt.NewRow();

fdr.Geometry = new SharpMap.Geometries.Point(93.7631004891, 25.7859509207);

fdr["MyAttributeColumn"] = "V1";


 FeatureDataRow fdr1 = fdt.NewRow();

fdr1.Geometry = new SharpMap.Geometries.Point(93.7826587239, 25.8311529114);

fdr1["MyAttributeColumn"] = "V2";



VectorLayer layPOI = new SharpMap.Layers.VectorLayer("POI");

layPOI.DataSource = new GeometryProvider(fdt);

layPOI.Style.Fill = new System.Drawing.SolidBrush(Color.Violet);


Sandip Chakraborty


Nov 2, 2010 at 1:47 PM
Edited Nov 2, 2010 at 1:49 PM

please use GeometryFeatureProvider if you have attribute data.

I think you need to set an image for your layPOI.Style.Symbol for anything to be drawn

hth FObermaier