Hi all, I could add layer as shapefile to map control. What I could not achieve is loading data from ESRI Geodatabase to map control
Here is my code:
try
{
var ogr = new OgrDatasource();
string source = @"url\data.gdb";
if (!ogr.Open(source))
{
MessageBox.Show("Failed to open data source. Err: " + ogr.GdalLastErrorMsg);
}
else
{
//My problem is here.
// What is the proper code to add one of the layers from the gdb to map control
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
After successfully connecting to gdb, what is the right function to add one of the layers in gdb to map control: axMap