<AGSInfoTemplateDelegate> Protocol Reference


Description

A protocol which must be adopted by any class wishing to display content for an AGSGraphic in the callout window. An instance of the class must then be set as the infoTemplateDelegate on the graphic.

The methods are optional. If the custom view method is implemented and does not return nil, then the other methods will not be called. This is because if a custom view is displayed in the callout then it is the only content in the callout.

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

List of all members.

Public Member Functions

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

Member Function Documentation

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

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]

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]

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]

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