移动端iOS 10 i 导航路径分析崩溃

0 投票
移动端iOS 10 i 导航路径分析崩溃

导航数据加载

    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:@"luwang_Network"];

    m_navigation = [m_mapControl getNavigation2];

    [m_navigation setPathVisible: true];

    [m_navigation setDeviateTolerance:500.00];

    [m_navigation setNetworkDataset:roadDataset];

    [m_navigation loadModel:filesnm];

路径分析如下

           Point2Ds *point2Ds = [[Point2Ds alloc]init];

                [point2Ds add:_startPoint2D];

                [point2Ds add:_endPoint2D];

                if ([m_mapControl.map.prjCoordSys type]!= PCST_EARTH_LONGITUDE_LATITUDE)

                {

                    PrjCoordSys *desPrjCoorSys = [[PrjCoordSys alloc]init];

                    [desPrjCoorSys setType:PCST_EARTH_LONGITUDE_LATITUDE];

                    CoordSysTransParameter *param = [[CoordSysTransParameter alloc]init];

                    [CoordSysTranslator convert:point2Ds PrjCoordSys:desPrjCoorSys PrjCoordSys:m_mapControl.map.prjCoordSys CoordSysTransParameter:param CoordSysTransMethod:MTH_GEOCENTRIC_TRANSLATION];

                }

                [m_navigation setStartPoint:_startPoint2D.x sPointY:_startPoint2D.y];

                [m_navigation setDestinationPoint:_endPoint2D.x dPointY:_endPoint2D.y];

                

                if([m_navigation isGuiding])

                {

                    [m_navigation cleanPath];

                    [m_navigation stopGuide];

                }

                NSLog(@"%@",[m_navigation routeAnalyst]);

                if(![m_navigation routeAnalyst])

                {

                    NSLog(@"无相关路径");

                }

                [m_navigation setPathVisible:true];

                [m_mapControl.map refresh];

会在,[m_navigation routeAnalyst]处崩溃
1月 6 分类:  105次浏览 | 用户: 随心iii 初出茅庐 (48 分)

1个回答

0 投票
所有的环境配置完成后,需要调用load方法,成功后才能进行分析
1月 6 用户: 周仕斌 名扬四海 (1,563 分)
load方法调用成功之后路径分析依然是崩溃的
...