This project is read-only.

Cast DotSpatial.Data.PolygonShapefile to Imap Layer

Jan 23, 2015 at 8:44 AM
I want to add a feature set to specified point in map layers.I used this code to add it
IFeatureSet iFeatureSet = FeatureSet.Open(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"OfflineLayers\Soils.shp"));
IMapLayer lay1 =(IMapLayer) iFeatureSet;
                     map.Layers.Insert(2, lay1);
                     IMapFeatureLayer lay = map.Layers[2];
But I can not cast 'DotSpatial.Data.PolygonShapefile' to type 'DotSpatial.Controls.IMapLayer' is there any way to fix this problem?
Thank you