AGSCalloutTemplate Class Reference


Description

Instances of this class represent a simple implementation of AGSInfoTemplateDelegate. Tokens of the form ${...} in the titleTemplate/detailTemplate are replaced at runtime with corresponding values from the graphic's attributes. The final text is then displayed in the callout.

For example, consider a graphic which has an attribute STATE_NAME with the value California. To display the attribute's value in the callout's title, you need to set ${STATE_NAME} as the titleTemplate. The token ${STATE_NAME} will then be automatically substituted with the value California when the callout is displayed.

Defined in:
AGSInfoTemplateDelegate.h ( ArcGIS library)
Since:
1.0
See also:
AGSMapViewDelegate for events related to showing the callout.
Inheritance diagram for AGSCalloutTemplate:
<AGSInfoTemplateDelegate>

List of all members.

Public Member Functions

(UIView *) - customViewForGraphic:screenPoint:mapPoint:
(NSString *) - detailForGraphic:screenPoint:mapPoint:
(UIImage *) - imageForGraphic:screenPoint:mapPoint:
(NSString *) - titleForGraphic:screenPoint:mapPoint:

Properties

NSString * detailTemplate
NSString * titleTemplate

Member Function Documentation

- (UIView*) customViewForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  mapPoint 
[optional, inherited]

The custom view to be displayed in the callout. If you implement this function then the title, detail and image methods will not get called, as only the custom view will be displayed in the callout. The callout will be expanded to the dimensions of the custom view.

Parameters:
graphic The graphic to display the custom view for.
screen The coordinates at which the graphic callout will be displayed.
mapPoint The coordinates at which the graphic callout will be displayed.
Returns:
The custom view to be displayed in the callout.
Since:
1.8
- (NSString *) detailForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  map 
[optional, inherited]

Detail string to be displayed in the callout.

Parameters:
graphic The graphic to display detail for.
screen The coordinates at which the graphic callout will be displayed.
map The coordinates at which the graphic callout will be displayed.
Returns:
The detail text for the callout.
Since:
1.0
- (UIImage*) imageForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  mapPoint 
[optional, inherited]

Image to be displayed in the callout to the left of the text. The image will be scaled to 40x40 points.

Parameters:
graphic The graphic to display the image for.
screen The coordinates at which the graphic callout will be displayed.
mapPoint The coordinates at which the graphic callout will be displayed.
Returns:
The image to be displayed in the callout.
Since:
1.8
- (NSString *) titleForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  map 
[optional, inherited]

Title text to be displayed in the callout.

Parameters:
graphic The graphic to display a title for.
screen The coordinates at which the graphic callout will be displayed.
map The coordinates at which the graphic callout will be displayed.
Returns:
The title text for the callout.
Since:
1.0

Property Documentation

- (NSString*) detailTemplate [read, write, copy]

Template used to display the detail string in the callout.

Since:
1.0
- (NSString*) titleTemplate [read, write, copy]

Template used to display the title in the callout.

Since:
1.0