首页 / 浏览问题 / 移动 / 问题详情
移动端10 i iOS端缓冲区在有数据的情况下崩溃
随心iii  (48分)  初出茅庐
2月24日, 2020
初始化数据 然后设置缓冲区参数 已知sourceRecordset有一条数据 运行之后会在

                bResult = [BufferAnalyst createBufferSourceRecordset:sourceRecordset ResultVector:recordDataSet BufferParam:bufferParam IsUnion:NO IsAttributeRetained:YES];

崩溃 代码如下

bufferParam = [[BufferAnalystParameter alloc]init];

                [bufferParam setLeftDistance:@"100"];

                [bufferParam setRightDistance:@"100"];

                [bufferParam setBufferRadiusUnit:Meter];

                [bufferParam setBufferEndType:FLAT];

                [bufferParam setSemicircleLineSegment:5];

                Datasets *dataset = [new_dataSoure datasets];

                DatasetVector *sourceDataSet = (DatasetVector*)[dataset getWithName:@"geo_important_area"];

                Recordset *sourceRecordset = [sourceDataSet queryWithFilter:@"name = '969-15'" Type:DYNAMIC];

                [m_mapControl.map.trackingLayer clear];

                if ([dataset contain:@"memeda"]) {

                    [dataset deleteName:@"memeda"];

                }

                DatasetVectorInfo *dataVectorInfo = [[DatasetVectorInfo alloc] init];

                [dataVectorInfo setDatasetType:REGION];

                [dataVectorInfo setName:@"memeda"];

                [dataVectorInfo setEncodeType:NONE];

                DatasetVector *recordDataSet = [dataset create:dataVectorInfo];

                BOOL bResult =  NO;

                bResult = [BufferAnalyst createBufferSourceRecordset:sourceRecordset ResultVector:recordDataSet BufferParam:bufferParam IsUnion:NO IsAttributeRetained:YES];

                if (bResult) {

                    NSLog(@"成功");

                }else{

                    NSLog(@"成功");

                }

运行项目sourceRecordset所得是1  依然崩溃

2 个回答

Recordset *sourceRecordset = [sourceDataSet queryWithFilter:@"name = '969-15'" Type:DYNAMIC];这里的查询改为静态游标 Type:STATIC 试试看呢,另外你的数据集是什么坐标系的?

周仕斌  (1,732分)  名扬四海
2月24日, 2020
ios移动端 空间分析 崩溃
看了下代码和数据,使用的是面对象进行缓冲区分析,只能使用圆头缓冲类型,也就是需要设置[bufferParam setBufferEndType:ROUND];
周仕斌  (1,732分)  名扬四海
3月4日, 2020
...