初始化数据 然后设置缓冲区参数 已知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(@"成功");
}