Ios 如何使用LayerID和ESRI获取特定图层的字段名称
实际上我尝试了一些方法,甚至检查了ESRI示例代码QueryTaskExample。我只需要获取任何层的字段名称或属性 我用了下面的方法Ios 如何使用LayerID和ESRI获取特定图层的字段名称,ios,gis,arcgis,Ios,Gis,Arcgis,实际上我尝试了一些方法,甚至检查了ESRI示例代码QueryTaskExample。我只需要获取任何层的字段名称或属性 我用了下面的方法 self.queryTask = [AGSQueryTask queryTaskWithURL:[NSURL URLWithString:strMAPURL]]; // here i send like @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_
self.queryTask = [AGSQueryTask queryTaskWithURL:[NSURL URLWithString:strMAPURL]]; // here i send like @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"
self.queryTask.delegate = self;
//return all fields in query
self.query = [AGSQuery query];
self.query.outFields = [NSArray arrayWithObjects:@"*", nil];
self.query.text = @"Fields";
[self.queryTask executeWithQuery:self.query];
i access below delegates :
//results are returned
- (void)queryTask:(AGSQueryTask *)queryTask operation:(NSOperation *)op didExecuteWithFeatureSetResult:(AGSFeatureSet *)featureSet {
//get feature, and load in to table
self.featureSet = featureSet;
[super.tableView reloadData];
}
featureSet.fields//这应该是第3层字段的名称
但我得到的数组是0个元素。。。。。。我需要以和服务器层相同的顺序获取字段