Instances of this class represent a callout window. A callout can be used to display information on a map. The callout displays a title and a detail string. It also contains an accessory button that can be used to display a secondary view with more details.
By default, the map's callout shows information about a graphic when a user taps on the graphic. The map's callout also shows information for each location update provided by the GPS.
You can programatically display a callout using the showCalloutAtPoint:
method from AGSMapView
.
To hide the callout, you can set it's hidden
property.
Public Member Functions | |
(void) | - moveCalloutTo:pixelOffset:animated: |
Properties | |
BOOL | accessoryButtonHidden |
UIColor * | color |
NSString * | detail |
UIColor * | detailColor |
UIColor * | highlight |
AGSPoint * | mapLocation |
AGSMapView * | mapView |
CGPoint | pixelOffset |
NSString * | title |
UIColor * | titleColor |
CGFloat | width |
- (void) moveCalloutTo: | (AGSPoint *) | mapLocation | ||
pixelOffset: | (CGPoint) | offset | ||
animated: | (BOOL) | animated | ||
Moves the callout to the specified map location and pixel offset.
mapLocation | The location on the map to move to. | |
offset | The offset from the map location to place the callout. | |
animated | Flag to determine if action should be animated. |
- (BOOL) accessoryButtonHidden [read, write, assign] |
Shows or hides the accessory button.
- (UIColor*) color [read, write, retain] |
Background color of callout. Default is black.
- (NSString*) detail [read, write, copy] |
Text for detail string. The detail for a graphic is provided by infoTemplateDelegate
on AGSGraphic
. The detail for a GPS location is provided by infoTemplateDelegate
on AGSGPS
.
- (UIColor*) detailColor [read, write, retain] |
Detail text color. Default is white.
- (UIColor*) highlight [read, write, retain] |
Highlight color of callout. Default is white.
- (AGSPoint*) mapLocation [read, retain] |
Location in map coordinates where the callout's leader should point to. If the callout is shown in response to a user tap, this property contains the tapped location. If the callout is shown in response to a GPS location update, this property contains that location.
- (AGSMapView*) mapView [read, assign] |
The map that will display the callout.
- (CGPoint) pixelOffset [read, assign] |
Pixels offset in screen coordinates from the map location that the callout leader should point to. This is generally used with Marker symbols that have offsets so that the callout will display in the correct location as the map is scaled (zoomed in or out). A positive x-value adjust the callout to the right. A positive y-value adjusts the callout down.
- (NSString*) title [read, write, copy] |
Text for title label. The title for a graphic is provided by infoTemplateDelegate
on AGSGraphic
. The title for a GPS location is provided by infoTemplateDelegate
on AGSGPS
.
- (UIColor*) titleColor [read, write, retain] |
Text color. Default is white.
- (CGFloat) width [read, write, assign] |
Callout width. The height is fixed.