NSString *fileUdb = [[NSBundle mainBundle] pathForResource:@"NewDataSource" ofType:@"udb"];
NSString *filesnm = [[NSBundle mainBundle] pathForResource:@"luwang_Network" ofType:@"snm"];
DatasourceConnectionInfo *info = [[DatasourceConnectionInfo alloc]init];
[info setEngineType:ET_UDB];
[info setServer:fileUdb];
info.alias = @"NewData";
Datasource *naviData = [[m_workspace datasources] open:info];
DatasetVector *roadDataset = (DatasetVector*)[[naviData datasets]getWithName:@"0"];
DatasetVector *datasetTurn = (DatasetVector*)[[naviData datasets]getWithName:@"1"];
[m_navigation setNetworkDataset:roadDataset];
[m_navigation setTurnDataset:datasetTurn];
m_navigation = [m_mapControl getNavigation2];
[m_navigation loadModel:filesnm];
获取本地UDB文件数据这样写有问题吗 为什么打印出来打开为nil呢 我看你们的导航的demo也是这样写的啊 代码如上