ArcGIS Runtime SDK for iOS
100.15
|
A callout window.
Instances of this class represent a callout window. A callout can be used to display information on a map. The callout can display a title and a detail string. It can also display a picture to the left of the title and detail, and an accessory button to the right which can be used to present a secondary view with more details.
You can change the content and look of the callout by setting its properties. You can also embed a custom view if you want to completely customize the layout.
AGSCalloutDelegate
Instance Methods | |
(void) | - dismiss |
(void) | - showCalloutAt:screenOffset:rotateOffsetWithMap:animated: |
(BOOL) | - showCalloutForFeature:tapLocation:animated: |
(BOOL) | - showCalloutForGraphic:tapLocation:animated: |
(BOOL) | - showCalloutForLocationDisplay |
Properties | |
BOOL | accessoryButtonHidden |
UIImage * | accessoryButtonImage |
UIButtonType | accessoryButtonType |
BOOL | autoAdjustWidth |
AGSColor * | borderColor |
CGFloat | borderWidth |
AGSColor * | color |
CGFloat | cornerRadius |
AGSView * | customView |
id< AGSCalloutDelegate > | delegate |
NSString * | detail |
AGSColor * | detailColor |
AGSColor * | highlight |
AGSImage * | image |
AGSCalloutLeaderPosition | leaderPositionFlags |
AGSPoint * | mapLocation |
CGSize | margin |
CGFloat | maxWidth |
id | representedObject |
CGPoint | screenOffset |
NSString * | title |
AGSColor * | titleColor |
CGFloat | width |
- (void) dismiss |
Dismisses the callout.
- (void) showCalloutAt: | (AGSPoint *) | mapLocation | |
screenOffset: | (CGPoint) | screenOffset | |
rotateOffsetWithMap: | (BOOL) | rotateOffsetWithMap | |
animated: | (BOOL) | animated | |
Shows the callout at the specified map location with the specified screen offset.
mapLocation | The location on the map to move to. |
screenOffset | The offset from the map location to place the callout in screen points. |
rotateOffsetWithMap | Whether or not the screenOffset should be translated by an amount equal to the map's rotation. |
animated | Flag to determine if action should be animated. |
- (BOOL) showCalloutForFeature: | (AGSFeature *) | feature | |
tapLocation: | (nullable AGSPoint *) | mapTapLocation | |
animated: | (BOOL) | animated | |
Shows the callout at the specified location for the provided feature. The callout's delegate
, if it exists, is informed just before the callout is shown through callout:willShowAtMapPoint: (AGSCalloutDelegate-p)
feature | for which callout is to be shown. This then becomes the representedObject |
mapTapLocation | at which the callout should be shown |
animated | Flag to determine if action should be animated. |
- (BOOL) showCalloutForGraphic: | (AGSGraphic *) | graphic | |
tapLocation: | (nullable AGSPoint *) | mapTapLocation | |
animated: | (BOOL) | animated | |
Shows the callout at the specified location for the provided graphic. The callout's delegate
, if it exists, is informed just before the callout is shown through callout:willShowAtMapPoint: (AGSCalloutDelegate-p)
graphic | for which callout is to be shown. This then becomes the representedObject |
mapTapLocation | at which the callout should be shown |
animated | Flag to determine if action should be animated. |
- (BOOL) showCalloutForLocationDisplay |
Shows the callout for the AGSLocationDisplay on the map. The callout's delegate
, if it exists, is informed just before the callout is shown through callout:willShowForLocationDisplay: (AGSCalloutDelegate-p)
|
readwritenonatomicassign |
Indicates whether the accessory button is hidden. Default is NO.
|
readwritenonatomicstrong |
The optional image used for the accessory button.
|
readwritenonatomicassign |
The type of button for the accessory button.
|
readwritenonatomicassign |
This is a parameter that specifies that the width of the callout should adjust to the size of the text. This parameter is ignored if using a custom view. The default is YES
.
|
readwritenonatomicstrong |
Callout's border color. Default is lightGrayColor
with 0.9
alpha.
|
readwritenonatomicassign |
Callout's border width. Default is 0.5
.
|
readwritenonatomicstrong |
Background color of callout. Default is whiteColor
with 0.9
alpha.
|
readwritenonatomicassign |
The corner radius in points for the rounded corners. This property is ignored if not using a custom view.
|
readwritenonatomicstrong |
The custom view to display in the callout. If this property is specified, the developer is responsible for the content displayed in the callout. The callout will expand to fit the dimensions of the custom view. Most of the other properties related to the look (such as width
, color, etc.) and content of the callout (such as title
, detail
, image
, accessoryButtonImage
, etc.) will be ignored.
|
readwritenonatomicweak |
The callout's delegate.
|
readwritenonatomiccopy |
Text for detail label.
|
readwritenonatomicstrong |
Detail text color. Default is blackColor
.
|
readwritenonatomicstrong |
Highlight color of callout. Default is nil
.
|
readwritenonatomicstrong |
The optional image used for displaying content to the left of the text labels. The image will be scaled to 30x30 points.
|
readwritenonatomicassign |
Flags specifying the possible leader locations when showing the callout. Possible values include:
AGSCalloutLeaderPositionLeft
AGSCalloutLeaderPositionRight
AGSCalloutLeaderPositionTop
AGSCalloutLeaderPositionBottom
AGSCalloutLeaderPositionAny
These values can be combined with the bitwise OR operator. The default value is AGSCalloutLeaderPositionBottom
.
AGSCalloutLeaderPositionAny
will attempt to find the best location for the given point. On the iPad, precedence is given based on the following sequence - left, right, bottom, top. On all other iOS devices, it is - bottom, top, left, right.
|
readnonatomicstrong |
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 AGSLocationDisplay location update, this property contains that location.
|
readwritenonatomicassign |
The margin in points around the text or the custom view.
|
readwritenonatomicassign |
The maximum width of the callout if the callout is autosizing to the text. To autosize to the text width, set the autoAdjustWidth property to YES. This property is ignored if using a custom view. The default value is 300
.
|
readnonatomicstrong |
The object that the callout is shown for. Could be a AGSFeature
, AGSGraphic
or AGSLocationDisplay
.
|
readnonatomicassign |
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 shifts the callout to the right. A positive y-value shifts the callout down.
|
readwritenonatomiccopy |
Text for title label.
|
readwritenonatomicstrong |
Text color. Default is blackColor
.
|
readwritenonatomicassign |
Callout width. This property is ignored if using a custom view.