Select to view content in your preferred language

Callout not show!

3349
1
10-27-2014 03:02 PM
MauricioSalazar
Deactivated User

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.

0 Kudos
1 Reply
by Anonymous User
Not applicable

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.

0 Kudos