ArcGIS Runtime SDK for iOS: AGSGeoView.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSGeoView.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24 
25  /*@file AGSGeoView.h */ //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSView.h>
29 #import <ArcGIS/AGSImage.h>
30 #import <ArcGIS/AGSViewpoint.h>
31 #import <ArcGIS/AGSCancelable.h>
32 
33 
34 
39 typedef NS_ENUM(NSInteger, AGSDrawStatus) {
42 };
43 
44 @class AGSSpatialReference;
45 @class AGSLayerViewState;
46 @class AGSLayer;
47 @class AGSPoint;
48 @class AGSGraphicsOverlay;
49 @class AGSGraphic;
52 @protocol AGSGeoViewTouchDelegate;
53 @class AGSCallout;
54 @class AGSTimeExtent;
55 @class AGSBookmark;
58 
66 @interface AGSGeoView : AGSView
67 
68 #pragma mark -
69 #pragma mark initializers
70 
71 #pragma mark -
72 #pragma mark properties
73 
78 @property (nonatomic, assign, readonly) AGSDrawStatus drawStatus;
79 
84 @property (nonatomic, copy, readonly) NSString *attributionText;
85 
90 @property (nonatomic, assign, readwrite, getter=isAttributionTextVisible) BOOL attributionTextVisible;
91 
97 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
98 
103 @property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating;
104 
108 @property (nonatomic, assign, readonly, getter=isWrapAroundEnabled) BOOL wrapAroundEnabled;
109 
114 @property (nonatomic, strong, readonly) NSMutableArray<AGSGraphicsOverlay*> *graphicsOverlays;
115 
119 @property (nonatomic, strong, readonly) AGSCallout *callout;
120 
125 @property (nullable, nonatomic, weak) IBOutlet id<AGSGeoViewTouchDelegate> touchDelegate;
126 
131 @property (nullable, nonatomic, copy, readwrite) void (^layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState);
132 
138 @property (nullable, nonatomic, copy, readwrite) void (^viewpointChangedHandler)(void);
139 
145 @property (nonatomic, strong, readonly) NSLayoutYAxisAnchor *attributionTopAnchor;
146 
160 @property (nullable, nonatomic, strong, readwrite) AGSTimeExtent *timeExtent;
161 
180 @property (nonatomic, strong, readwrite) AGSSelectionProperties *selectionProperties;
181 
193 @property (nonatomic, nullable, strong, readwrite) AGSViewLabelProperties *labeling;
194 
195 @property (nonatomic, assign) BOOL releaseHardwareResourcesWhenBackgrounded;
196 
197 #pragma mark -
198 #pragma mark methods
199 
205 -(id<AGSCancelable>)exportImageWithCompletion:(void(^)(AGSImage *__nullable image, NSError *__nullable error))completion;
206 
212 -(nullable AGSViewpoint*)currentViewpointWithType:(AGSViewpointType)viewpointType;
213 
219 -(nullable AGSLayerViewState*)layerViewStateForLayer:(AGSLayer*)layer;
220 
231 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
232  screenPoint:(CGPoint)screenPoint
233  tolerance:(double)tolerance
234  returnPopupsOnly:(BOOL)returnPopupsOnly
235  maximumResults:(NSInteger)maximumResults
236  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
237 
247 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
248  screenPoint:(CGPoint)screenPoint
249  tolerance:(double)tolerance
250  returnPopupsOnly:(BOOL)returnPopupsOnly
251  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
252 
262 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
263  tolerance:(double)tolerance
264  returnPopupsOnly:(BOOL)returnPopupsOnly
265  maximumResultsPerOverlay:(NSInteger)maximumResultsPerOverlay
266  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
267 
276 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
277  tolerance:(double)tolerance
278  returnPopupsOnly:(BOOL)returnPopupsOnly
279  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
280 
291 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
292  screenPoint:(CGPoint)screenPoint
293  tolerance:(double)tolerance
294  returnPopupsOnly:(BOOL)returnPopupsOnly
295  maximumResults:(NSInteger)maximumResults
296  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
297 
307 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
308  screenPoint:(CGPoint)screenPoint
309  tolerance:(double)tolerance
310  returnPopupsOnly:(BOOL)returnPopupsOnly
311  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
312 
322 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
323  tolerance:(double)tolerance
324  returnPopupsOnly:(BOOL)returnPopupsOnly
325  maximumResultsPerLayer:(NSInteger)maximumResultsPerLayer
326  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
327 
336 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
337  tolerance:(double)tolerance
338  returnPopupsOnly:(BOOL)returnPopupsOnly
339  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
340 
341 
342 #pragma mark Viewpoint methods
343 
349 -(void)setViewpoint:(AGSViewpoint*)viewpoint;
350 
357 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint completion:(nullable void(^)(BOOL finished))completion;
358 
366 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint duration:(double)duration completion:(nullable void(^)(BOOL finished))completion;
367 
373 -(id<AGSCancelable>)setBookmark:(AGSBookmark*)bookmark completion:(nullable void(^)(BOOL finished))completion;
374 
375 @end
376 
377 
378 
379 #pragma mark -
380 #pragma mark Touch Delegate Methods
381 #pragma mark -
382 
394 @optional
395 
396 
397 #pragma mark Tap
398 
406 - (void)geoView:(AGSGeoView *)geoView didTapAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
407 
408 #pragma mark Touch
409 
419 -(void)geoView:(AGSGeoView*)geoView didTouchDownAtScreenPoint:(CGPoint)screenPoint
420  mapPoint:(AGSPoint*)mapPoint
421  completion:(void(^)(BOOL willHandleDrag))completion;
422 
423 
431 -(void)geoView:(AGSGeoView*)geoView didTouchDragToScreenPoint:(CGPoint)screenPoint
432  mapPoint:(AGSPoint*)mapPoint;
433 
441  -(void)geoView:(AGSGeoView*)geoView didTouchUpAtScreenPoint:(CGPoint)screenPoint
442  mapPoint:(AGSPoint*)mapPoint;
443 
448 -(void)geoViewDidCancelTouchDrag:(AGSGeoView*)geoView;
449 
450 #pragma mark Double Tap
451 
460 -(void)geoView:(AGSGeoView*)geoView didDoubleTapAtScreenPoint:(CGPoint)screenPoint
461  mapPoint:(AGSPoint *)mapPoint
462  completion:(void(^)(BOOL willHandleDoubleTap))completion;
463 
464 #pragma mark Long Press
465 
474 - (void)geoView:(AGSGeoView *)geoView didLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
475 
483 - (void)geoView:(AGSGeoView *)geoView didMoveLongPressToScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
484 
492 - (void)geoView:(AGSGeoView *)geoView didEndLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
493 
500 - (void)geoViewDidCancelLongPress:(AGSGeoView *)geoView;
501 
502 #pragma mark Force Touch
503 
516 - (void)geoView:(AGSGeoView *)geoView didForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
517 
527 - (void)geoView:(AGSGeoView *)geoView didChangeForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
528 
538 - (void)geoView:(AGSGeoView *)geoView didEndForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
539 
544 - (void)geoViewDidCancelForceTouch:(AGSGeoView *)geoView;
545 
546 @end
547 
548 
AGSDrawStatus
Definition: AGSGeoView.h:39
@ AGSDrawStatusCompleted
Definition: AGSGeoView.h:41
@ AGSDrawStatusInProgress
Definition: AGSGeoView.h:40
#define AGSImage
Definition: AGSImage.h:34
#define AGSView
Definition: AGSView.h:32
AGSViewpointType
Definition: AGSViewpoint.h:36
A geographic or time location for quick navigation.
Definition: AGSBookmark.h:37
A callout window.
Definition: AGSCallout.h:69
A base class for all views that can display geographic content on screen.
Definition: AGSGeoView.h:67
BOOL attributionTextVisible
Definition: AGSGeoView.h:90
void(^ layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState)
IBOutlet id< AGSGeoViewTouchDelegate > touchDelegate
Definition: AGSGeoView.h:125
NSLayoutYAxisAnchor * attributionTopAnchor
Definition: AGSGeoView.h:145
AGSCallout * callout
Definition: AGSGeoView.h:119
AGSViewLabelProperties * labeling
Definition: AGSGeoView.h:193
AGSSelectionProperties * selectionProperties
Definition: AGSGeoView.h:180
void(^ viewpointChangedHandler)(void)
AGSDrawStatus drawStatus
Definition: AGSGeoView.h:78
AGSSpatialReference * spatialReference
Definition: AGSGeoView.h:97
AGSTimeExtent * timeExtent
Definition: AGSGeoView.h:160
BOOL navigating
Definition: AGSGeoView.h:103
BOOL wrapAroundEnabled
Definition: AGSGeoView.h:108
NSString * attributionText
Definition: AGSGeoView.h:84
NSMutableArray< AGSGraphicsOverlay * > * graphicsOverlays
Definition: AGSGeoView.h:114
BOOL releaseHardwareResourcesWhenBackgrounded
Definition: AGSGeoView.h:195
A graphic on top of a map.
Definition: AGSGraphic.h:58
An overlay to display graphics on the map.
Definition: AGSGraphicsOverlay.h:82
Results of an identify graphic overlay operation on an AGSGeoView object.
Definition: AGSIdentifyGraphicsOverlayResult.h:43
Results of an identify layer operation on an AGSGeoView object.
Definition: AGSIdentifyLayerResult.h:44
An abstract base class for all layers.
Definition: AGSLayer.h:201
The view state of a layer.
Definition: AGSLayerViewState.h:74
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
Selection properties of an AGSGeoView.
Definition: AGSSelectionProperties.h:40
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:49
Represents a span of time between a start time and end time.
Definition: AGSTimeExtent.h:42
Label properties for AGSGeoView.
Definition: AGSViewLabelProperties.h:37
Represents the view location of an AGSMapView or AGSSceneView object.
Definition: AGSViewpoint.h:51
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
A touch delegate for AGSGeoView.
Definition: AGSGeoView.h:393