ArcGIS Runtime SDK for iOS: AGSCallout.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSCallout.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 1995-2020 ESRI
3 
4  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
5  Unpublished material - all rights reserved under the
6  Copyright Laws of the United States and applicable international
7  laws, treaties, and conventions.
8 
9  For additional information, contact:
10  Environmental Systems Research Institute, Inc.
11  Attn: Contracts and Legal Services Department
12  380 New York Street
13  Redlands, California, 92373
14  USA
15 
16  email: contracts@esri.com
17  */
18 
19 #import <Foundation/Foundation.h>
20 #if TARGET_OS_IPHONE
21 #import <ArcGIS/AGSView.h>
22 #import <ArcGIS/AGSImage.h>
23 #import <UIKit/UIButton.h>
24 #endif
25 #import <ArcGIS/AGSColor.h>
26 
27 @protocol AGSCalloutDelegate;
28 @class AGSPoint;
29 @class AGSLocationDisplay;
30 @class AGSFeature;
31 @class AGSGraphic;
32 
33 
34 
35 #if TARGET_OS_IPHONE
36 
40 typedef NS_OPTIONS(NSUInteger, AGSCalloutLeaderPosition) {
46 } ;
47 #endif
48  //Required for Globals API doc
50 
67 #if TARGET_OS_IPHONE
68 @interface AGSCallout : AGSView
69 
70 #pragma mark -
71 #pragma mark initializers
72 
73 #pragma mark -
74 #pragma mark properties
75 
79 @property (nonatomic) CGFloat width;
80 
87 @property (nullable, nonatomic, strong) AGSView *customView;
88 
89 
93 @property (nonatomic) UIButtonType accessoryButtonType;
94 
98 @property (nullable, nonatomic, strong) UIImage *accessoryButtonImage;
99 
100 
105 @property (nullable, nonatomic, strong) AGSImage *image;
106 
111 @property (nonatomic) BOOL autoAdjustWidth;
112 
117 @property (nonatomic, assign, getter=isAccessoryButtonHidden) BOOL accessoryButtonHidden;
118 
137 @property (nonatomic, assign) AGSCalloutLeaderPosition leaderPositionFlags;
138 
142 @property (nullable, nonatomic, strong) AGSColor *borderColor;
143 
147 @property (nonatomic, assign) CGFloat borderWidth;
148 
149 
150 #elif TARGET_OS_OSX
151 @interface AGSCallout : NSObject
152 
153 @property (nonatomic, assign, getter = isHidden) BOOL hidden;
154 
158 @property (nonatomic, assign) BOOL highlightTop;
159 
160 #endif
161 
168 @property (nullable, nonatomic, strong, readonly) AGSPoint *mapLocation;
169 
177 @property (nonatomic, readonly) CGPoint screenOffset;
178 
182 @property (nullable, nonatomic, copy) NSString *title;
183 
187 @property (nullable, nonatomic, copy) NSString *detail;
188 
192 @property (nonatomic, strong) AGSColor *color;
193 
197 @property (nullable, nonatomic, strong) AGSColor *highlight;
198 
202 @property (nonatomic, strong) AGSColor *titleColor;
203 
207 @property (nonatomic, strong) AGSColor *detailColor;
208 
212 @property (nullable, nonatomic, weak) id<AGSCalloutDelegate> delegate;
213 
217 @property (nonatomic) CGSize margin;
218 
223 @property (nonatomic) CGFloat cornerRadius;
224 
230 @property (nonatomic) CGFloat maxWidth;
231 
235 @property (nullable, nonatomic, strong, readonly) id representedObject;
236 
237 #pragma mark -
238 #pragma mark methods
239 
249 -(BOOL)showCalloutForFeature:(AGSFeature*)feature tapLocation:(nullable AGSPoint*)mapTapLocation animated:(BOOL)animated;
250 
260 -(BOOL)showCalloutForGraphic:(AGSGraphic*)graphic tapLocation:(nullable AGSPoint*)mapTapLocation animated:(BOOL)animated;
261 
269 
277 -(void)showCalloutAt:(AGSPoint*)mapLocation screenOffset:(CGPoint)screenOffset rotateOffsetWithMap:(BOOL)rotateOffsetWithMap animated:(BOOL)animated;
278 
282 -(void)dismiss;
283 
284 @end
285 
286 
287 
288 #pragma mark -
289 
301 
302 @optional
303 
310 -(BOOL)callout:(AGSCallout*)callout willShowAtMapPoint:(AGSPoint *)mapPoint;
311 
318 -(BOOL)callout:(AGSCallout*)callout willShowForLocationDisplay:(AGSLocationDisplay*)locationDisplay;
319 
323 -(void)calloutWillDismiss:(AGSCallout*)callout;
324 
328 -(void)calloutDidDismiss:(AGSCallout*)callout;
329 
330 #if TARGET_OS_IPHONE
331 
337 - (void)didTapAccessoryButtonForCallout:(AGSCallout *)callout;
338 
339 #elif TARGET_OS_OSX
340 
345 -(void)didTapCallout:(AGSCallout*)callout;
346 
347 #endif
348 
349 @end
350 
351 
CGSize margin
Definition: AGSCallout.h:217
CGFloat borderWidth
Definition: AGSCallout.h:147
Definition: AGSCallout.h:42
AGSImage * image
Definition: AGSCallout.h:105
NSString * detail
Definition: AGSCallout.h:187
AGSColor * color
Definition: AGSCallout.h:192
void dismiss()
A delegate of AGSCallout.
Definition: AGSCallout.h:300
AGSColor * borderColor
Definition: AGSCallout.h:142
AGSPoint * mapLocation
Definition: AGSCallout.h:168
Definition: AGSCallout.h:43
CGFloat cornerRadius
Definition: AGSCallout.h:223
id representedObject
Definition: AGSCallout.h:235
BOOL autoAdjustWidth
Definition: AGSCallout.h:111
NSString * title
Definition: AGSCallout.h:182
UIButtonType accessoryButtonType
Definition: AGSCallout.h:93
CGPoint screenOffset
Definition: AGSCallout.h:177
Definition: AGSCallout.h:44
AGSCalloutLeaderPosition leaderPositionFlags
Definition: AGSCallout.h:137
AGSColor * titleColor
Definition: AGSCallout.h:202
AGSView * customView
Definition: AGSCallout.h:87
BOOL showCalloutForLocationDisplay()
AGSColor * detailColor
Definition: AGSCallout.h:207
Definition: AGSCallout.h:45
UIImage * accessoryButtonImage
Definition: AGSCallout.h:98
A graphic on top of a map.
Definition: AGSGraphic.h:51
AGSCalloutLeaderPosition
Definition: AGSCallout.h:40
A representation of a real-world object on a map.
Definition: AGSFeature.h:40
id< AGSCalloutDelegate > delegate
Definition: AGSCallout.h:212
A callout window.
Definition: AGSCallout.h:68
Displays device location on a map.
Definition: AGSLocationDisplay.h:58
Definition: AGSCallout.h:41
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:57
BOOL accessoryButtonHidden
Definition: AGSCallout.h:117
CGFloat width
Definition: AGSCallout.h:79
CGFloat maxWidth
Definition: AGSCallout.h:230
AGSColor * highlight
Definition: AGSCallout.h:197