Hi, i try to show a callout from the geodatabase runtime content generated in Arcmap 10.2.1, iOS 7.0
but not show nothing, i have enabled gestureRecognizer in the MapView.
My code is this:
- (void)viewDidLoad
{
docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *PathGDB= [NSString stringWithFormat:@"%@/Mapas/data/app_navegacion.geodatabase",docDir];
NSError* __autoreleasing ErrorGDB;
AGSGDBGeodatabase *gdb =[ [AGSGDBGeodatabase alloc] initWithPath:PathGDB error:&ErrorGDB];
localFeatureTable = [[gdb featureTables] objectAtIndex:0];
localFeatureTableLayer = [[AGSFeatureTableLayer alloc] initWithFeatureTable:localFeatureTable];
localFeatureTableLayer.delegate = self;
localFeatureTableLayer.allowCallout = YES;
}
-(BOOL)callout:(AGSCallout *)callout willShowForFeature:(id<AGSFeature>)feature layer:(AGSLayer<AGSHitTestable> *)layer mapPoint:(AGSPoint *)mapPoint {
self.mapView.callout.title = (NSString*)[feature attributeForKey:@"TextString"];
self.mapView.callout.detail =(NSString*)[feature attributeForKey:@"FontName"];
return YES;
}
Thanks.
When you add a breakpoint for this line:
self.mapView.callout.title = (NSString*)[feature attributeForKey:@"TextString"];
is that line called when you tap at a feature?
If not, there is another layer or interaction with the map that is grabbing that event.