I am trying to use SharpMap to render spatial data from SQL sever2008R2 in a windows form application. Below is a sample code I tried out. Everytime I tried running the code I keep getting this error message that I need to assign IGeometryServices or implement IGeometryService, since SharpMap lacks comprehensive documentation, can any on point me in the right direction please, if possible with a sample code
SharpMap.Layers.VectorLayer vlay = new SharpMap.Layers.VectorLayer("States");
//vlay.DataSource = new SharpMap.Data.Providers.ShapeFile("d:\\+PMF\\GIS\\states_ugl.shp", true);
SharpMap.Data.Providers.SqlServer2008 d = new SharpMap.Data.Providers.SqlServer2008(connectionString, "view1","geom","ID",SharpMap.Data.Providers.SqlServerSpatialObjectType.Geometry,false ,4326 );
mapBox1.Map.Layers.Add(vlay);
mapBox1.Map.ZoomToExtents();
// mapBox1.Map.BackColor = Color.BlueViolet;
mapBox1.Refresh();
Did you try