ArcGIS Runtime SDK for iOS: AGSSketchEditor.h Source File
ArcGIS Runtime SDK for iOS  100.9
AGSSketchEditor.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  //Required for Globals API doc
20 
21 #import <Foundation/Foundation.h>
22 #import <ArcGIS/AGSDefines.h>
23 #import <ArcGIS/AGSGeometry.h>
24 
25 
26 
32 typedef NS_ENUM(NSInteger, AGSSketchCreationMode) {
44 };
45 
46 @class AGSSketchStyle;
48 @class AGSPoint;
50 
57 AGS_EXTERN NSNotificationName __nonnull const AGSSketchEditorGeometryDidChangeNotification;
58 
68 @interface AGSSketchEditor : NSObject
69 
70 #pragma mark -
71 #pragma mark initializers
72 
73 +(instancetype)sketchEditor;
74 
75 #pragma mark -
76 #pragma mark properties
77 
81 @property (nonatomic, assign, readonly) AGSSketchCreationMode creationMode;
82 
86 @property (nonatomic, strong, readonly) NSUndoManager *undoManager;
87 
91 @property (nonatomic, assign, readwrite) float opacity;
92 
96 @property (nonatomic, assign, readwrite, getter=isVisible) BOOL visible;
97 
101 @property (nonatomic, assign, readonly, getter=isStarted) BOOL started;
102 
107 @property (nullable, nonatomic, strong, readonly) AGSGeometry *geometry;
108 
132 @property (nonatomic, assign, readonly, getter=isSketchValid) BOOL sketchValid;
133 
137 @property (nonatomic, strong, readwrite) AGSSketchStyle *style;
138 
142 @property (nullable, nonatomic, strong, readwrite) AGSSketchEditConfiguration *editConfiguration;
143 
147 @property (nullable, nonatomic, strong, readwrite) AGSSketchVertex *selectedVertex;
148 
149 #pragma mark -
150 #pragma mark methods
151 
152 #pragma mark start/stop methods
153 
159 -(BOOL)startWithGeometry:(AGSGeometry*)geometry;
160 
161 
168 -(BOOL)startWithGeometry:(nullable AGSGeometry*)geometry
169  creationMode:(AGSSketchCreationMode)creationMode;
170 
178 -(BOOL)startWithGeometry:(nullable AGSGeometry*)geometry
179  creationMode:(AGSSketchCreationMode)creationMode
180  editConfiguration:(nullable AGSSketchEditConfiguration*)editConfiguration;
181 
188 -(BOOL)startWithCreationMode:(AGSSketchCreationMode)creationMode
189  editConfiguration:(nullable AGSSketchEditConfiguration*)editConfiguration;
190 
195 -(BOOL)startWithCreationMode:(AGSSketchCreationMode)creationMode;
196 
197 
204 -(BOOL)startWithGeometryType:(AGSGeometryType)geometryType;
205 
209 -(void)stop;
210 
211 #pragma mark mutate geometry methods
212 
216 -(void)clearGeometry;
217 
223 -(void)replaceGeometry:(AGSGeometry*)geometry;
224 
228 -(BOOL)insertVertexAfterSelectedVertexWithPoint:(AGSPoint*)point;
229 
233 -(BOOL)moveSelectedVertexToPoint:(AGSPoint*)point;
234 
238 -(BOOL)removeSelectedVertex;
239 
240 @end
241 
242 
A class that represents a vertex or mid-vertex in the AGSSketchEditor.
Definition: AGSSketchVertex.h:39
BOOL visible
Definition: AGSSketchEditor.h:96
Defines common members for all specific types of geometry.
Definition: AGSGeometry.h:106
Definition: AGSSketchEditor.h:33
Definition: AGSSketchEditor.h:39
Definition: AGSSketchEditor.h:40
Definition: AGSSketchEditor.h:37
AGSSketchEditConfiguration * editConfiguration
Definition: AGSSketchEditor.h:142
AGSSketchStyle * style
Definition: AGSSketchEditor.h:137
AGS_EXTERN NSNotificationName __nonnull const AGSSketchEditorGeometryDidChangeNotification
Definition: AGSSketchEditor.h:49
Definition: AGSSketchEditor.h:38
instancetype sketchEditor()
Definition: AGSSketchEditor.h:42
AGSSketchVertex * selectedVertex
Definition: AGSSketchEditor.h:147
Definition: AGSSketchEditor.h:43
AGSGeometryType
Definition: AGSGeometry.h:42
Definition: AGSSketchEditor.h:34
AGSSketchCreationMode creationMode
Definition: AGSSketchEditor.h:81
BOOL started
Definition: AGSSketchEditor.h:101
Represents edit configuration for AGSSketchEditor.
Definition: AGSSketchEditConfiguration.h:50
#define AGS_EXTERN
Definition: AGSDefines.h:22
Definition: AGSSketchEditor.h:41
BOOL removeSelectedVertex()
BOOL sketchValid
Definition: AGSSketchEditor.h:132
float opacity
Definition: AGSSketchEditor.h:91
NSUndoManager * undoManager
Definition: AGSSketchEditor.h:86
Style for the visual appearance of AGSSketchEditor.
Definition: AGSSketchStyle.h:35
AGSSketchCreationMode
Definition: AGSSketchEditor.h:32
AGSGeometry * geometry
Definition: AGSSketchEditor.h:107
A class that allows the user to sketch geometries on the map.
Definition: AGSSketchEditor.h:68
Definition: AGSSketchEditor.h:36
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:57
Definition: AGSSketchEditor.h:35