ArcGIS Runtime SDK for iOS: AGSSketchEditor.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSSketchEditor.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  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSDefines.h>
29 #import <ArcGIS/AGSGeometry.h>
30 
31 
32 
38 typedef NS_ENUM(NSInteger, AGSSketchCreationMode) {
50 };
51 
52 @class AGSSketchStyle;
54 @class AGSPoint;
55 @class AGSSketchVertex;
56 
63 AGS_EXTERN NSNotificationName __nonnull const AGSSketchEditorGeometryDidChangeNotification;
64 
74 @interface AGSSketchEditor : NSObject
75 
76 #pragma mark -
77 #pragma mark initializers
78 
79 +(instancetype)sketchEditor;
80 
81 #pragma mark -
82 #pragma mark properties
83 
87 @property (nonatomic, assign, readonly) AGSSketchCreationMode creationMode;
88 
92 @property (nonatomic, strong, readonly) NSUndoManager *undoManager;
93 
97 @property (nonatomic, assign, readwrite) float opacity;
98 
102 @property (nonatomic, assign, readwrite, getter=isVisible) BOOL visible;
103 
107 @property (nonatomic, assign, readonly, getter=isStarted) BOOL started;
108 
113 @property (nullable, nonatomic, strong, readonly) AGSGeometry *geometry;
114 
138 @property (nonatomic, assign, readonly, getter=isSketchValid) BOOL sketchValid;
139 
143 @property (nonatomic, strong, readwrite) AGSSketchStyle *style;
144 
148 @property (nullable, nonatomic, strong, readwrite) AGSSketchEditConfiguration *editConfiguration;
149 
153 @property (nullable, nonatomic, strong, readwrite) AGSSketchVertex *selectedVertex;
154 
155 #pragma mark -
156 #pragma mark methods
157 
158 #pragma mark start/stop methods
159 
165 -(BOOL)startWithGeometry:(AGSGeometry*)geometry;
166 
167 
174 -(BOOL)startWithGeometry:(nullable AGSGeometry*)geometry
175  creationMode:(AGSSketchCreationMode)creationMode;
176 
184 -(BOOL)startWithGeometry:(nullable AGSGeometry*)geometry
185  creationMode:(AGSSketchCreationMode)creationMode
186  editConfiguration:(nullable AGSSketchEditConfiguration*)editConfiguration;
187 
194 -(BOOL)startWithCreationMode:(AGSSketchCreationMode)creationMode
195  editConfiguration:(nullable AGSSketchEditConfiguration*)editConfiguration;
196 
201 -(BOOL)startWithCreationMode:(AGSSketchCreationMode)creationMode;
202 
203 
210 -(BOOL)startWithGeometryType:(AGSGeometryType)geometryType;
211 
215 -(void)stop;
216 
217 #pragma mark mutate geometry methods
218 
222 -(void)clearGeometry;
223 
229 -(void)replaceGeometry:(AGSGeometry*)geometry;
230 
234 -(BOOL)insertVertexAfterSelectedVertexWithPoint:(AGSPoint*)point;
235 
239 -(BOOL)moveSelectedVertexToPoint:(AGSPoint*)point;
240 
244 -(BOOL)removeSelectedVertex;
245 
246 @end
247 
248 
#define AGS_EXTERN
Definition: AGSDefines.h:28
AGSGeometryType
Definition: AGSGeometry.h:49
AGSSketchCreationMode
Definition: AGSSketchEditor.h:38
@ AGSSketchCreationModePolyline
Definition: AGSSketchEditor.h:42
@ AGSSketchCreationModePolygon
Definition: AGSSketchEditor.h:43
@ AGSSketchCreationModeEllipse
Definition: AGSSketchEditor.h:47
@ AGSSketchCreationModeUnset
Definition: AGSSketchEditor.h:39
@ AGSSketchCreationModeArrow
Definition: AGSSketchEditor.h:49
@ AGSSketchCreationModeFreehandPolygon
Definition: AGSSketchEditor.h:45
@ AGSSketchCreationModePoint
Definition: AGSSketchEditor.h:40
@ AGSSketchCreationModeRectangle
Definition: AGSSketchEditor.h:46
@ AGSSketchCreationModeFreehandPolyline
Definition: AGSSketchEditor.h:44
@ AGSSketchCreationModeTriangle
Definition: AGSSketchEditor.h:48
@ AGSSketchCreationModeMultipoint
Definition: AGSSketchEditor.h:41
AGS_EXTERN NSNotificationName __nonnull const AGSSketchEditorGeometryDidChangeNotification
Definition: AGSSketchEditor.h:55
Base class for all classes that represent geometric shapes.
Definition: AGSGeometry.h:121
A location defined by x and y (and optionally z) coordinates.
Definition: AGSPoint.h:73
Represents edit configuration for AGSSketchEditor.
Definition: AGSSketchEditConfiguration.h:57
A class that allows the user to sketch geometries on the map.
Definition: AGSSketchEditor.h:75
NSUndoManager * undoManager
Definition: AGSSketchEditor.h:92
float opacity
Definition: AGSSketchEditor.h:97
instancetype sketchEditor()
BOOL sketchValid
Definition: AGSSketchEditor.h:138
AGSSketchStyle * style
Definition: AGSSketchEditor.h:143
AGSGeometry * geometry
Definition: AGSSketchEditor.h:113
BOOL removeSelectedVertex()
AGSSketchEditConfiguration * editConfiguration
Definition: AGSSketchEditor.h:148
AGSSketchVertex * selectedVertex
Definition: AGSSketchEditor.h:153
BOOL started
Definition: AGSSketchEditor.h:107
AGSSketchCreationMode creationMode
Definition: AGSSketchEditor.h:87
BOOL visible
Definition: AGSSketchEditor.h:102
Style for the visual appearance of AGSSketchEditor.
Definition: AGSSketchStyle.h:42
A class that represents a vertex or mid-vertex in the AGSSketchEditor.
Definition: AGSSketchVertex.h:46