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

How do I add a shapefile layer?

Use the ShapeFile Provider:
SharpMap.Layers.VectorLayer layWorld = new SharpMap.Layers.VectorLayer("World");
//Specifing true will save the spatial index to a file which will make it load quicker the next time
layWorld.DataSource = new SharpMap.Providers.ShapeFile(@"C:\Data\Countries.shp", true); 

Last edited Aug 31, 2012 at 12:50 PM by FObermaier, version 7