ArcGIS Runtime SDK for iOS: AGSGeoView.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSGeoView.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 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 
32 
33 
38 typedef NS_ENUM(NSInteger, AGSDrawStatus) {
41 };
42 
43 @class AGSSpatialReference;
44 @class AGSLayerViewState;
45 @class AGSLayer;
46 @class AGSPoint;
47 @class AGSGraphicsOverlay;
48 @class AGSGraphic;
51 @protocol AGSGeoElement;
52 @protocol AGSGeoViewTouchDelegate;
53 @class AGSCallout;
54 @class AGSTimeExtent;
55 @class AGSBookmark;
58 
59 @protocol AGSCancelable;
60 
61 
69 @interface AGSGeoView : AGSView
70 
71 #pragma mark -
72 #pragma mark initializers
73 
74 #pragma mark -
75 #pragma mark properties
76 
81 @property (nonatomic, assign, readonly) AGSDrawStatus drawStatus;
82 
87 @property (nonatomic, copy, readonly) NSString *attributionText;
88 
93 @property (nonatomic, assign, readwrite, getter=isAttributionTextVisible) BOOL attributionTextVisible;
94 
100 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
101 
106 @property (nonatomic, assign, readonly, getter=isNavigating) BOOL navigating;
107 
111 @property (nonatomic, assign, readonly, getter=isWrapAroundEnabled) BOOL wrapAroundEnabled;
112 
117 @property (nonatomic, strong, readonly) NSMutableArray<AGSGraphicsOverlay*> *graphicsOverlays;
118 
122 @property (nonatomic, strong, readonly) AGSCallout *callout;
123 
128 @property (nullable, nonatomic, weak) IBOutlet id<AGSGeoViewTouchDelegate> touchDelegate;
129 
134 @property (nullable, nonatomic, copy, readwrite) void (^layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState);
135 
141 @property (nullable, nonatomic, copy, readwrite) void (^viewpointChangedHandler)(void);
142 
148 @property (nonatomic, strong, readonly) NSLayoutYAxisAnchor *attributionTopAnchor;
149 
163 @property (nullable, nonatomic, strong, readwrite) AGSTimeExtent *timeExtent;
164 
183 @property (nonatomic, strong, readwrite) AGSSelectionProperties *selectionProperties;
184 
196 @property (nonatomic, nullable, strong, readwrite) AGSViewLabelProperties *labeling;
197 
198 @property (nonatomic, assign) BOOL releaseHardwareResourcesWhenBackgrounded;
199 
200 #pragma mark -
201 #pragma mark methods
202 
208 -(id<AGSCancelable>)exportImageWithCompletion:(void(^)(AGSImage *__nullable image, NSError *__nullable error))completion;
209 
215 -(nullable AGSViewpoint*)currentViewpointWithType:(AGSViewpointType)viewpointType;
216 
222 -(nullable AGSLayerViewState*)layerViewStateForLayer:(AGSLayer*)layer;
223 
234 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
235  screenPoint:(CGPoint)screenPoint
236  tolerance:(double)tolerance
237  returnPopupsOnly:(BOOL)returnPopupsOnly
238  maximumResults:(NSInteger)maximumResults
239  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
240 
250 -(id<AGSCancelable>)identifyGraphicsOverlay:(AGSGraphicsOverlay*)graphicsOverlay
251  screenPoint:(CGPoint)screenPoint
252  tolerance:(double)tolerance
253  returnPopupsOnly:(BOOL)returnPopupsOnly
254  completion:(void(^)(AGSIdentifyGraphicsOverlayResult *identifyResult))completion;
255 
265 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
266  tolerance:(double)tolerance
267  returnPopupsOnly:(BOOL)returnPopupsOnly
268  maximumResultsPerOverlay:(NSInteger)maximumResultsPerOverlay
269  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
270 
279 -(id<AGSCancelable>)identifyGraphicsOverlaysAtScreenPoint:(CGPoint)screenPoint
280  tolerance:(double)tolerance
281  returnPopupsOnly:(BOOL)returnPopupsOnly
282  completion:(void(^)(NSArray<AGSIdentifyGraphicsOverlayResult*> * __nullable identifyResults, NSError * __nullable error))completion;
283 
294 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
295  screenPoint:(CGPoint)screenPoint
296  tolerance:(double)tolerance
297  returnPopupsOnly:(BOOL)returnPopupsOnly
298  maximumResults:(NSInteger)maximumResults
299  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
300 
310 -(id<AGSCancelable>)identifyLayer:(AGSLayer*)layer
311  screenPoint:(CGPoint)screenPoint
312  tolerance:(double)tolerance
313  returnPopupsOnly:(BOOL)returnPopupsOnly
314  completion:(void(^)(AGSIdentifyLayerResult *identifyResult))completion;
315 
325 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
326  tolerance:(double)tolerance
327  returnPopupsOnly:(BOOL)returnPopupsOnly
328  maximumResultsPerLayer:(NSInteger)maximumResultsPerLayer
329  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
330 
339 -(id<AGSCancelable>)identifyLayersAtScreenPoint:(CGPoint)screenPoint
340  tolerance:(double)tolerance
341  returnPopupsOnly:(BOOL)returnPopupsOnly
342  completion:(void(^)(NSArray<AGSIdentifyLayerResult*> * __nullable identifyResults, NSError * __nullable error))completion;
343 
344 
345 #pragma mark Viewpoint methods
346 
352 -(void)setViewpoint:(AGSViewpoint*)viewpoint;
353 
360 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint completion:(nullable void(^)(BOOL finished))completion;
361 
369 -(id<AGSCancelable>)setViewpoint:(AGSViewpoint*)viewpoint duration:(double)duration completion:(nullable void(^)(BOOL finished))completion;
370 
376 -(id<AGSCancelable>)setBookmark:(AGSBookmark*)bookmark completion:(nullable void(^)(BOOL finished))completion;
377 
378 @end
379 
380 
381 
382 #pragma mark -
383 #pragma mark Touch Delegate Methods
384 #pragma mark -
385 
397 @optional
398 
399 
400 #pragma mark Tap
401 
409 - (void)geoView:(AGSGeoView *)geoView didTapAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
410 
411 #pragma mark Touch
412 
422 -(void)geoView:(AGSGeoView*)geoView didTouchDownAtScreenPoint:(CGPoint)screenPoint
423  mapPoint:(AGSPoint*)mapPoint
424  completion:(void(^)(BOOL willHandleDrag))completion;
425 
426 
434 -(void)geoView:(AGSGeoView*)geoView didTouchDragToScreenPoint:(CGPoint)screenPoint
435  mapPoint:(AGSPoint*)mapPoint;
436 
444  -(void)geoView:(AGSGeoView*)geoView didTouchUpAtScreenPoint:(CGPoint)screenPoint
445  mapPoint:(AGSPoint*)mapPoint;
446 
451 -(void)geoViewDidCancelTouchDrag:(AGSGeoView*)geoView;
452 
453 #pragma mark Double Tap
454 
463 -(void)geoView:(AGSGeoView*)geoView didDoubleTapAtScreenPoint:(CGPoint)screenPoint
464  mapPoint:(AGSPoint *)mapPoint
465  completion:(void(^)(BOOL willHandleDoubleTap))completion;
466 
467 #pragma mark Long Press
468 
477 - (void)geoView:(AGSGeoView *)geoView didLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
478 
486 - (void)geoView:(AGSGeoView *)geoView didMoveLongPressToScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
487 
495 - (void)geoView:(AGSGeoView *)geoView didEndLongPressAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint;
496 
503 - (void)geoViewDidCancelLongPress:(AGSGeoView *)geoView;
504 
505 #pragma mark Force Touch
506 
519 - (void)geoView:(AGSGeoView *)geoView didForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
520 
530 - (void)geoView:(AGSGeoView *)geoView didChangeForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
531 
541 - (void)geoView:(AGSGeoView *)geoView didEndForceTouchAtScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint force:(double)force;
542 
547 - (void)geoViewDidCancelForceTouch:(AGSGeoView *)geoView;
548 
549 @end
550 
551 
AGSDrawStatus
Definition: AGSGeoView.h:38
@ AGSDrawStatusCompleted
Definition: AGSGeoView.h:40
@ AGSDrawStatusInProgress
Definition: AGSGeoView.h:39
#define AGSImage
Definition: AGSImage.h:34
#define AGSView
Definition: AGSView.h:32
AGSViewpointType
Definition: AGSViewpoint.h:37
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:70
BOOL attributionTextVisible
Definition: AGSGeoView.h:93
void(^ layerViewStateChangedHandler)(AGSLayer *layer, AGSLayerViewState *layerViewState)
IBOutlet id< AGSGeoViewTouchDelegate > touchDelegate
Definition: AGSGeoView.h:128
NSLayoutYAxisAnchor * attributionTopAnchor
Definition: AGSGeoView.h:148
AGSCallout * callout
Definition: AGSGeoView.h:122
AGSViewLabelProperties * labeling
Definition: AGSGeoView.h:196
AGSSelectionProperties * selectionProperties
Definition: AGSGeoView.h:183
void(^ viewpointChangedHandler)(void)
AGSDrawStatus drawStatus
Definition: AGSGeoView.h:81
AGSSpatialReference * spatialReference
Definition: AGSGeoView.h:100
AGSTimeExtent * timeExtent
Definition: AGSGeoView.h:163
BOOL navigating
Definition: AGSGeoView.h:106
BOOL wrapAroundEnabled
Definition: AGSGeoView.h:111
NSString * attributionText
Definition: AGSGeoView.h:87
NSMutableArray< AGSGraphicsOverlay * > * graphicsOverlays
Definition: AGSGeoView.h:117
BOOL releaseHardwareResourcesWhenBackgrounded
Definition: AGSGeoView.h:198
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:194
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:46
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:52
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
An abstract representation of geographic entities on a map.
Definition: AGSGeoElement.h:43
A touch delegate for AGSGeoView.
Definition: AGSGeoView.h:396