首页 / 浏览问题 / 移动GIS / 问题详情
移动端iOS 10 i 导航路径分析崩溃
48EXP 2020年01月06日
移动端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个回答

所有的环境配置完成后,需要调用load方法,成功后才能进行分析
1,752EXP 2020年01月06日
load方法调用成功之后路径分析依然是崩溃的
...