Hi,
I try to work with a FileGeoDatabaseFeatureLayer but I don’t get it… I have downloaded from this web site a zip file about “wri.org/resources/data-s…al-maps-20” but I do not understand what should be the file name and table that I have to use to load the features from this source to the map… some help required here :>(.
thanks in advance.
jm.
ps: if you could download the zip file : wri.org/sites/default/files/AqueductGlobalMaps20_20130123.zip
FileGeoDatabase question
Hi Jm,
I have downloaded the file and it works fine with FileGeoDatabaseFeatureLayer. I created an instruction on how to work with FileGeodatabae step by step.
1. Make sure the current machine have installed the necessary dlls. Please check the dlls under systemRoot(like system32 or SysWOW64)=>Map Suite x.0=> FileGeoDatabaseX64 or FileGeoDatabaseX86.
2. Download a FileGeodatabase file(the FileGeodatabase file should be a folder which the name is end with “.gdb”).
3. Get the tables in current gdb file if we have no idea what tables are in it. We can get the tables with the help of the static method “GetTableNames” in FileGeoDatabaseFeatureLayer.
4. Get the OBJECTID column name. Generally speaking, the default objectid column name is “OBJECTID”, however, some gdb file might have the other column as the object id like “OBJECTID_1” from AqueductGlobalMaps20_20130123.zip. we can find the OJBECTID column by its type “OID“.
5. After confirm those information, we can use those similar codes like below:
string gdbname = @“D:\TestData\AqueductGlobalMaps20_20130123\aqueduct_global_dl_20130123.gdb”;
string tableName = “global_master_20130123”;
string id = “OBJECTID_1”;
FileGeoDatabaseFeatureLayer fgdb = new FileGeoDatabaseFeatureLayer(gdbname,tableName,id);
fgdb.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.County2;
fgdb.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
fgdb.Open();
if everything goes well, we can get the below result.
Don’t hesitate to let us know if there is anything confused.
Thanks,
Johnny
Hi Johnny!
Works!!! I love it!!!
jm.
Thinkgeo is great and Thinkgeo developers are the best in classssssss!!!
Hi Jm,
Glad to hear it works for you! We appreciate you giving us such a high praise and hope we can do better in the future with your advises.
Happy Halloween!
Johnny