10.2.5: <AGSCalloutDelegate> Protocol Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
<AGSCalloutDelegate> Protocol Reference

Description

A protocol which must be adopted by a class wishing to control the behavior of displaying callout for features or the map's location display symbol. The delegate is also notified when a user interacts with the callout window. An instance of the class must be set as AGSCallout::delegate.

All of the methods of this protocol are optional.

Defined in:
AGSCallout.h ( ArcGIS library)

Since
1.0
Inheritance diagram for <AGSCalloutDelegate>:

Instance Methods

(BOOL) - callout:willShowForFeature:layer:mapPoint:
 
(BOOL) - callout:willShowForLocationDisplay:
 
(void) - calloutDidDismiss:
 
(void) - calloutWillDismiss:
 
(void) - didClickAccessoryButtonForCallout:
 

Method Documentation

- (BOOL) callout: (AGSCallout *)  callout
willShowForFeature: (id< AGSFeature >)  feature
layer: (AGSLayer< AGSHitTestable > *)  layer
mapPoint: (AGSPoint *)  mapPoint 
optional

Delegates should implement this method when they want to configure how a callout looks for a particular feature in a particular layer. Some properties delegates may want to configure are title, detail, image, customView, etc. The delegate should return YES for the callout to be shown. The delegate can return NO for those features for which a callout should not be shown. This method will only be called if AGSHitTestable::calloutDelegate is not set.

Parameters
calloutThe callout that will show.
featureThe feature to display the callout for.
layerThe layer the feature belongs to.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
Value indicating whether or not the callout should actually show.
Since
10.2
- (BOOL) callout: (AGSCallout *)  callout
willShowForLocationDisplay: (AGSLocationDisplay *)  locationDisplay 
optional

Delegates should implement this method when they want to configure how a callout looks for the location display symbol. Some properties delegates may want to configure are title, detail, image, customView, etc. The delegate should return YES for the callout to be shown, or NO otherwise.

Parameters
calloutThe callout that will show.
locationDisplayThe locationDisplay to display the callout for.
Returns
Value indicating whether or not the callout should actually show.
Since
10.2
- (void) calloutDidDismiss: (AGSCallout *)  callout
optional

Notifies the delegate that the callout was dismissed.

Since
10.2
- (void) calloutWillDismiss: (AGSCallout *)  callout
optional

Notifies the delegate that the callout will be dismissed.

Since
10.2
- (void) didClickAccessoryButtonForCallout: (AGSCallout *)  callout
optional

Tells the delegate the user tapped on the accessory button in the callout. You can check the AGSCallout::representedObject to find out what object the callout was being displayed for

Parameters
calloutCallout containing accessory button.
Since
10.1.1