ios二维查询,未找到Service示例代码,参照Iserver示例代码进行参数设置,一直报错:errCode:400 参数 queryMode 不能为空
查询调用方法 :[service queryWithServiceParam:parameter QueryMode:SpatialQuery];
我想进行SqlQuery,但是上面方法中的QueryMode不管是SqlQuery还是SpatialQuery都报相同的错,该怎么解决???
就是里面那个Iserver的范例,后面改名字了,可以参考看下 -(void)querySpatial{ QueryService *queryservice = [[QueryService alloc]init]; ServiceQueryParameter *parameter = [[ServiceQueryParameter alloc]init]; GeoPoint *geo = [[GeoPoint alloc]initWithX:45.0 Y:24.0]; parameter.mServiceAddress = @"http://support.supermap.com.cn:8090"; parameter.mServiceName = @"map-world/rest"; parameter.mMapName = @"World"; parameter.mQueryLayerName = @"Capitals@World#1"; if(isFirst) { [parameter setAttriButeFilter:@"SMID > 10"]; NSLog(@"SMID大于10"); isFirst = !isFirst; } else { [parameter setAttriButeFilter:@"SMID < 10"]; NSLog(@"SMID小于10"); isFirst = !isFirst; } parameter.m_pGeometry = geo; [parameter setNqueryOption:ATTRIBUTEANDGEOMETRY]; //设置空间查询操作模式 parameter.spatialQueryMode = SQM_DISJOINT; //设置空间查询中的搜索对象 parameter.spatialQueryObject = geo; queryservice.queryServiceDelegate = self; [queryservice queryWithServiceParam:parameter QueryMode:SpatialQuery]; //m_bResultEnable = false; }