AnsweredAssumed Answered

error: property 'calloutDelegate' not found on object of type 'AGSGraphicsLayer'

Question asked by lewte041 on Nov 22, 2013
Latest reply on Jan 14, 2014 by vibindhasksrec123
Hi,
I am very new to the ios SDK and I am trying to create my first app. I would like to have call outs displayed for my feature layer points (from a feature service). I have been following the developers guide online and consulting the runtime samples provided however I keep running into several errors in the guide and the samples.

For the following sample code:
AGSCalloutTemplate* template = [[AGSCalloutTempate alloc] init] ;
template.titleTemplate = @"${CITY_NAME}"; //show the value for attribute key 'CITY_NAME'
template.detailTemplate = @"${POPULATION}"; //show the value for attribute key 'POPULATION'

AGSGraphicsLayer* layer = ... ;
layer.calloutDelegate = template;

I get the error "property 'calloutDelegate' not found on object of type 'AGSGraphicsLayer'".

and for the following sample code:
- (BOOL) callout:(AGSCallout *)callout willShowForFeature:(id<AGSFeature>)beerLayer layer:(AGSLayer<AGSHitTestable> *)beerLayer mapPoint:(AGSPoint *)mapPoint{
}

I get the errors "Cannot find protocol declaration for 'AGSFeature' and 'AGSHitTestable'".

How do I rectify these errors?

Cheers

Outcomes