ArcGIS Runtime SDK for iOS: AGSGeoView.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSGeoView.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  /*@file AGSGeoView.h */ //Required for Globals API doc
20 
21 #import <ArcGIS/AGSView.h>
22 #import <ArcGIS/AGSImage.h>
23 #import <ArcGIS/AGSViewpoint.h>
24 
25 
26 
31 typedef NS_ENUM(NSInteger, AGSDrawStatus) {
34 };
35 
36 @class AGSSpatialReference;
37 @class AGSLayerViewState;
38 @class AGSLayer;
39 @class AGSPoint;
40 @class AGSGraphicsOverlay;
41 @class AGSGraphic;
44 @protocol AGSGeoElement;
45 @protocol AGSGeoViewTouchDelegate;
46 @class AGSCallout;
47 @class AGSTimeExtent;
48 @class AGSBookmark;
50 
51 @protocol AGSCancelable;
52 
53 
61 @interface AGSGeoView : AGSView
62 
63 #pragma mark -
64 #pragma mark initializers
65 
66 #pragma mark -
67 #pragma mark properties
68 
72 @property (nonatomic, assign, readonly) AGSDrawStatus drawStatus;
73 
77 @property (nonatomic, copy, readonly) NSString *attributionText;
78 
83 @property (nonatomic, assign, readwrite, getter=isAttributionTextVisible) BOOL attributionTextVisible;
84 
89 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
90 
94 @property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating;
95 
99 @property (nonatomic, assign, readonly, getter=isWrapAroundEnabled) BOOL wrapAroundEnabled;
100 
105 @property (nonatomic, strong, readonly) NSMutableArray<AGSGraphicsOverlay*> *graphicsOverlays;
106 
110 @property (nonatomic, strong, readonly) AGSCallout *callout;
111 
116 @property (nullable, nonatomic, weak) IBOutlet id<AGSGeoViewTouchDelegate> touchDelegate;
117 
122 @property (nullable, nonatomic, copy, readwrite) void (^layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState);
123 
129 @property (nullable, nonatomic, copy, readwrite) void (^viewpointChangedHandler)(void);
130 
136 @property (nonatomic, strong, readonly) NSLayoutYAxisAnchor *attributionTopAnchor;
137 
150 @property (nullable, nonatomic, strong, readwrite) AGSTimeExtent *timeExtent;
151 
152 @property (nonatomic, strong, readwrite) AGSSelectionProperties *selectionProperties;
153 
154 #if (TARGET_OS_IPHONE)
155 #pragma mark - iOS Specific API
156 @property (nonatomic, assign) BOOL releaseHardwareResourcesWhenBackgrounded;
157 #endif
158 
159 #if TARGET_OS_OSX
160 #pragma mark - Mac OSX Specific API
161 
167 @property (nonatomic, assign) BOOL trackCursorMovement;
168 #endif
169 
170 #pragma mark -
171 #pragma mark methods
172 
178 -(id<AGSCancelable>)exportImageWithCompletion:(void(^)(AGSImage *__nullable image, NSError *__nullable error))completion;
179 
185 -(nullable AGSViewpoint*)currentViewpointWithType:(AGSViewpointType)viewpointType;
186 
192 -(nullable AGSLayerViewState*)layerViewStateForLayer:(AGSLayer*)layer;
193 
204 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
205  screenPoint:(CGPoint)screenPoint
206  tolerance:(double)tolerance
207  returnPopupsOnly:(BOOL)returnPopupsOnly
208  maximumResults:(NSInteger)maximumResults
209  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
210 
220 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
221  screenPoint:(CGPoint)screenPoint
222  tolerance:(double)tolerance
223  returnPopupsOnly:(BOOL)returnPopupsOnly
224  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
225 
235 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
236  tolerance:(double)tolerance
237  returnPopupsOnly:(BOOL)returnPopupsOnly
238  maximumResultsPerOverlay:(NSInteger)maximumResultsPerOverlay
239  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
240 
249 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
250  tolerance:(double)tolerance
251  returnPopupsOnly:(BOOL)returnPopupsOnly
252  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
253 
264 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
265  screenPoint:(CGPoint)screenPoint
266  tolerance:(double)tolerance
267  returnPopupsOnly:(BOOL)returnPopupsOnly
268  maximumResults:(NSInteger)maximumResults
269  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
270 
280 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
281  screenPoint:(CGPoint)screenPoint
282  tolerance:(double)tolerance
283  returnPopupsOnly:(BOOL)returnPopupsOnly
284  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
285 
295 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
296  tolerance:(double)tolerance
297  returnPopupsOnly:(BOOL)returnPopupsOnly
298  maximumResultsPerLayer:(NSInteger)maximumResultsPerLayer
299  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
300 
309 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
310  tolerance:(double)tolerance
311  returnPopupsOnly:(BOOL)returnPopupsOnly
312  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
313 
314 
315 #pragma mark Viewpoint methods
316 
322 -(void)setViewpoint:(AGSViewpoint*)viewpoint;
323 
330 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint completion:(nullable void(^)(BOOL finished))completion;
331 
339 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint duration:(double)duration completion:(nullable void(^)(BOOL finished))completion;
340 
346 -(id<AGSCancelable>)setBookmark:(AGSBookmark*)bookmark completion:(nullable void(^)(BOOL finished))completion;
347 
348 @end
349 
350 
351 
352 #pragma mark -
353 #pragma mark Touch Delegate Methods
354 #pragma mark -
355 
368 @optional
369 
370 
371 #pragma mark Tap
372 
380 - (void)geoView:(AGSGeoView *)geoView didTapAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
381 
382 #pragma mark Touch
383 
393 -(void)geoView:(AGSGeoView*)geoView didTouchDownAtScreenPoint:(CGPoint)screenPoint
394  mapPoint:(AGSPoint*)mapPoint
395  completion:(void(^)(BOOL willHandleDrag))completion;
396 
397 
405 -(void)geoView:(AGSGeoView*)geoView didTouchDragToScreenPoint:(CGPoint)screenPoint
406  mapPoint:(AGSPoint*)mapPoint;
407 
415  -(void)geoView:(AGSGeoView*)geoView didTouchUpAtScreenPoint:(CGPoint)screenPoint
416  mapPoint:(AGSPoint*)mapPoint;
417 
422 -(void)geoViewDidCancelTouchDrag:(AGSGeoView*)geoView;
423 
424 #pragma mark Double Tap
425 
434 -(void)geoView:(AGSGeoView*)geoView didDoubleTapAtScreenPoint:(CGPoint)screenPoint
435  mapPoint:(AGSPoint *)mapPoint
436  completion:(void(^)(BOOL willHandleDoubleTap))completion;
437 
438 #pragma mark Long Press
439 
448 - (void)geoView:(AGSGeoView *)geoView didLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
449 
457 - (void)geoView:(AGSGeoView *)geoView didMoveLongPressToScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
458 
466 - (void)geoView:(AGSGeoView *)geoView didEndLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
467 
474 - (void)geoViewDidCancelLongPress:(AGSGeoView *)geoView;
475 
476 #ifdef TARGET_OS_IPHONE
477 
478 #pragma mark Force Touch
479 
492 - (void)geoView:(AGSGeoView *)geoView didForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
493 
503 - (void)geoView:(AGSGeoView *)geoView didChangeForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
504 
514 - (void)geoView:(AGSGeoView *)geoView didEndForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
515 
520 - (void)geoViewDidCancelForceTouch:(AGSGeoView *)geoView;
521 
522 #endif
523 
524 #if TARGET_OS_OSX
525 
526 #pragma mark macOS specific delegate methods
527 
537 -(void)geoView:(AGSGeoView *)geoView didMoveCursorToScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint*)mapPoint;
538 
543 -(void)geoView:(AGSGeoView *)geoView didKeyDown:(NSEvent*)event;
544 
549 -(void)geoView:(AGSGeoView *)geoView didKeyUp:(NSEvent*)event;
550 
559 -(BOOL)geoView:(AGSGeoView *)geoView shouldProcessKeyEquivalentEvent:(NSEvent*)event;
560 
561 #endif
562 
563 @end
564 
565 
A touch delegate for AGSGeoView.
Definition: AGSGeoView.h:367
Selection properties of an AGSGeoView.
Definition: AGSSelectionProperties.h:32
Results of an identify layer operation on AGSGeoView.
Definition: AGSIdentifyLayerResult.h:36
BOOL attributionTextVisible
Definition: AGSGeoView.h:83
Represents a span of time between a start time and end time.
Definition: AGSTimeExtent.h:32
AGSDrawStatus drawStatus
Definition: AGSGeoView.h:72
AGSSelectionProperties * selectionProperties
Definition: AGSGeoView.h:152
The view state of a layer.
Definition: AGSLayerViewState.h:66
NSLayoutYAxisAnchor * attributionTopAnchor
Definition: AGSGeoView.h:136
A bookmark in a map.
Definition: AGSBookmark.h:30
BOOL releaseHardwareResourcesWhenBackgrounded
Definition: AGSGeoView.h:156
NSMutableArray< AGSGraphicsOverlay * > * graphicsOverlays
Definition: AGSGeoView.h:105
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:39
Definition: AGSGeoView.h:32
AGSTimeExtent * timeExtent
Definition: AGSGeoView.h:150
AGSDrawStatus
Definition: AGSGeoView.h:31
A base class for all views that can display geographic content on screen.
Definition: AGSGeoView.h:61
Represents the view location of AGSMapView or AGSSceneView.
Definition: AGSViewpoint.h:49
AGSViewpointType
Definition: AGSViewpoint.h:30
IBOutlet id< AGSGeoViewTouchDelegate > touchDelegate
Definition: AGSGeoView.h:116
NSString * attributionText
Definition: AGSGeoView.h:77
BOOL navigating
Definition: AGSGeoView.h:94
void(^ layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState)
An abstract representation of geographic entities on a map.
Definition: AGSGeoElement.h:37
An abstract base class for all layers.
Definition: AGSLayer.h:169
AGSCallout * callout
Definition: AGSGeoView.h:110
A graphic on top of a map.
Definition: AGSGraphic.h:51
void(^ viewpointChangedHandler)(void)
AGSSpatialReference * spatialReference
Definition: AGSGeoView.h:89
A callout window.
Definition: AGSCallout.h:68
BOOL wrapAroundEnabled
Definition: AGSGeoView.h:99
An overlay to display graphics on the map.
Definition: AGSGraphicsOverlay.h:62
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:57
Results of an identify graphic overlay operation on AGSGeoView.
Definition: AGSIdentifyGraphicsOverlayResult.h:35
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:32
Definition: AGSGeoView.h:33