public void ShowFeature(Predicate <System.Data.DataRow> p = null) { List <SharpMap.Geometries.Geometry> geometries = new List <SharpMap.Geometries.Geometry>(); m_shapeFileData.Open(); for (uint i = 0; i < m_shapeFileData.GetFeatureCount(); ++i) { SharpMap.Data.FeatureDataRow featureDataRow = m_shapeFileData.GetFeature(i); if (p == null || p(featureDataRow)) { geometries.Add(m_shapeFileData.GetGeometryByID(i)); } } m_shapeFileData.Close(); m_shapeLayer.DataSource = new GeometryFeatureProvider(geometries); if (myMap.Layers.IndexOf(m_shapeLayer) == -1) { myMap.Layers.Add(m_shapeLayer); } //myMap.ZoomToExtents(); }