arcgis iOS 如何在callout willShowForFeature 方法里显示所有的数据

默认情况下:api只提供了三个字段显示气泡
callout.title 
callout.detail
callout.image
 
但是如果我的本地geodatabase里返回十几个字段,如何在点击的时候,在气泡全部显示完整,如图:

我找不到对应的方法,麻烦指导一下,谢谢了
屏幕快照_2017-11-16_下午4.46_.48_.png
已邀请:

马克玲

赞同来自:

detail里可以显示全部的属性字段呀,举个例子:
- (BOOL)callout:(AGSCallout *)callout willShowForFeature:(id<AGSFeature>)feature layer:(AGSLayer<AGSHitTestable> *)layer mapPoint:(AGSPoint *)mapPoint{

    AGSGraphic* graphic = (AGSGraphic*)feature;

    callout.title =  [graphic attributeAsStringForKey:@"NAME"];

    callout.detail = [NSString stringWithFormat:@"'90: %@, '99: %@", [graphic attributeAsStringForKey:@"POP1990"], [graphic attributeAsStringForKey:@"POP1999"]];

    return YES;

}


 

张宝才 - ArcGIS fans

赞同来自:

需要自定义视图来显示
self.callout.customView = 你自己创建的视图

要回复问题请先登录注册