就是里面那个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;
}