AGSSketchGraphicsLayer Class Reference
Description
A layer that allows the user to sketch geometries on the map.
- See also:
- Conceptual Doc: Using a Sketch Layer
-
Sample: Sketch Layer
- Since:
- 1.8
List of all members.
Member Function Documentation
Adds graphic
to the layer. You must call dataChanged
to redraw the layer.
- Parameters:
-
| graphic | The graphic to be added. |
- Since:
- 1.0
- (void) addGraphics: |
|
(NSArray *) |
graphics |
|
|
Adds graphics
to the layer. You must call dataChanged
to redraw the layer.
- Parameters:
-
- Since:
- 1.0
Add a part to the geometry
- Since:
- 1.8
Applies the passed in geometry to the current geometry. These geometries must be matching in type.
- Since:
- 1.8
Clears the current geometry.
- Since:
- 1.8
This method tells the graphics layer that the underlying graphics or symbology has changed and that it needs to be redrawn.
- Since:
- 1.0
Implements AGSLayer.
The default main symbol for sketch graphics layers, this symbol is used for the lines and fills.
- Since:
- 1.8
The default symbol to display the mid vertices for sketch graphics layers.
- Since:
- 1.8
The default selected vertex symbol for sketch graphics layers.
- Since:
- 1.8
The default symbol used to display the vertices for sketch graphics layers.
- Since:
- 1.8
Get new map image. The exportDelegate is notified when the image is exported. This method must be implemented by subclasses.
- Parameters:
-
| params | The input parameters for the export image operation. |
- Since:
- 1.0
A method to get an initialized and autoreleased graphics layer.
- Returns:
- A new, autoreleased, graphics layer object.
- Since:
- 1.0
Initializes an AGSSketchGraphicsLayer.
- Parameters:
-
| geometry | The geometry that will be modified as the user sketches. This geometry must be mutable. |
- Since:
- 1.8
- (void) insertVertex: |
|
(AGSPoint *) |
point |
inPart: |
|
(int) |
partIndex |
atIndex: |
|
(int) |
coordinateIndex | |
|
|
| | |
Inserts a vertex in a specfied part and index.
- Parameters:
-
| point | The vertex to insert. |
| partIndex | The index of the part to insert the point. |
| coordinateIndex | The index of the coordinate at which to insert the point. |
- Since:
- 1.8
- (void) layerDidFailToLoad: |
|
(NSError *) |
error |
|
|
Method to notify the delegate that a layer failed to load. This method will also post a "LayerFailedToLoad" notification that can be observed by the developer.
- Parameters:
-
| error | Information regarding the cause of the layer failing to load. |
- Since:
- 1.0
Method to notify the delegate that a layer successfully loaded. This method will also post a "LayerDidLoad" notification that can be observed by the developer.
- Since:
- 1.0
- (void) mapView: |
|
(AGSMapView *) |
mapView |
didClickAtPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mappoint |
graphics: |
|
(NSDictionary *) |
graphics | |
|
|
| | |
- (void) mapView: |
|
(AGSMapView *) |
mapView |
didEndTapAndHoldAtPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mappoint |
graphics: |
|
(NSDictionary *) |
graphics | |
|
|
| | |
The method that is called when a user ends a tap and hold on the map.
- Since:
- 1.8
Reimplemented from <AGSMapViewTouchDelegate>.
- (void) mapView: |
|
(AGSMapView *) |
mapView |
didMoveTapAndHoldAtPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mappoint |
graphics: |
|
(NSDictionary *) |
graphics | |
|
|
| | [optional, inherited] |
Tells the delegate that the user moved his finger while tapping and holding on the map.
- Parameters:
-
| mapView | Map tapped and held by the user. |
| screen | Location in screen coordinates. |
| mappoint | Location in map coordinates. |
| graphics | Graphics from all graphics layers in the map that intersect or contain the location. The dictionary contains layer name (key) : AGSGraphic array (value) |
- Since:
- 1.8
- (void) mapView: |
|
(AGSMapView *) |
mapView |
didTapAndHoldAtPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mappoint |
graphics: |
|
(NSDictionary *) |
graphics | |
|
|
| | [optional, inherited] |
Tells the delegate that a point on the map was tapped and held at specified location.
- Parameters:
-
| mapView | Map tapped and held by the user. |
| screen | Location in screen coordinates. |
| mappoint | Location in map coordinates. |
| graphics | Graphics from all graphics layers in the map that intersect or contain the location. The dictionary contains layer name (key) : AGSGraphic array (value) |
- Since:
- 1.8
- (BOOL) mapView: |
|
(AGSMapView *) |
mapView |
shouldProcessClickAtPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mappoint | |
|
|
| | [optional, inherited] |
Asks the delegate if the map should process the click at the given location. The default value if this method is not implemented is YES
.
- Parameters:
-
| mapView | Map tapped by the user. |
| screen | Location in screen coordinates. |
| mappoint | Location in map coordinates. |
- Returns:
BOOL
value whether the click should be processed by the map.
- Since:
- 2.0
- (void) moveVertexInPart: |
|
(int) |
partIndex |
atIndex: |
|
(int) |
coordinateIndex |
toPoint: |
|
(AGSPoint *) |
point | |
|
|
| | |
Moves a vertex to a specified location.
- Parameters:
-
| partIndex | The index of the part to insert the point. |
| coordinateIndex | The index of the coordinate at which to insert the point. |
| point | The location to move the point to. |
- Since:
- 1.8
- (void) removeAllGraphics |
|
|
|
|
Remove all graphics from the layer. You must call dataChanged
to redraw the layer.
- Since:
- 1.0
Remove graphic
from the graphics collection. You must call dataChanged
to redraw the layer.
- Parameters:
-
| graphic | The graphic to be removed. |
- Since:
- 1.0
- (void) removePartAtIndex: |
|
(int) |
partIndex |
|
|
Removes a part at a specified index.
- Parameters:
-
| partIndex | Index of the part to remove. |
- Since:
- 1.8
- (BOOL) removeSelectedPart |
|
|
|
|
Removes the selected part.
- Returns:
- Boolean value that specifies if the remove succeeded.
- Since:
- 1.8
- (BOOL) removeSelectedVertex |
|
|
|
|
Removes the selected vertex.
- Returns:
- Boolean value that specifies if the remove succeeded.
- Since:
- 1.8
- (void) removeVertexInPart: |
|
(int) |
partIndex |
atIndex: |
|
(int) |
coordinateIndex | |
|
|
| | |
Remove a vertex in a specified part and index.
- Parameters:
-
| partIndex | The index of the part to remove the vertex. |
| coordinateIndex | The index of the coordinate to remove. |
- Since:
- 1.8
- (void) selectLastVertex |
|
|
|
|
Selects the last vertex in the geometry.
- Since:
- 1.8
Property Documentation
Delegate to be notified when the layer is loaded or fails to load. When this layer is loaded, a corresponding AGSLayerView
object is automatically set as the delegate. This delegate must not be replaced.
- Since:
- 1.0
- (NSError*) error [read, retain, inherited] |
Information about the error associated with a layer.
- Since:
- 1.0
Delegate to be notified of events related to exporting the map image. When this layer is loaded, a corresponding View object is automatically set as the exportDelegate
which should not be replaced.
- Since:
- 1.0
- (AGSEnvelope*) fullEnvelope [read, assign, inherited] |
The geometry that is populated as the user sketches. Must be a mutable geometry because it will be modified by the layer while the user is sketching.
- Since:
- 1.8
Defines the drawing behavior for a dynamic layer when the map's gps is in an auto-pan mode. For some layers, especially those that make network request, you may want this property accordingly. When the map is navigating from the gps it can generate a lot of requests resulting in a heavy server load.
- Since:
- 2.1
- (NSMutableArray*) graphics [read, retain, inherited] |
The array of AGSGraphic
objects that need to be displayed on the map.
- Since:
- 1.0
- (AGSEnvelope*) initialEnvelope [read, write, retain, inherited] |
Gets or sets the initial envelope of the layer.
- Since:
- 1.0
Implements AGSLayer.
- (BOOL) loaded [read, assign, inherited] |
A property indicating whether the layer is loaded and ready to be used. When the layer is loaded, the value becomes YES
, and layer properties can be accessed.
- Since:
- 1.0
- See also:
- AGSLayerDelegate
Composite symbol that contains the symbology for drawing the lines and fills for what the user sketches.
- Since:
- 1.8
- (double) maxScale [read, write, assign, inherited] |
The maximum scale at which this layer is visible. If the map is zoomed in beyond this scale, the layer will not be visible.
- Since:
- 1.0
Implements AGSDynamicLayer.
Symbol to display the mid vertices.
- Since:
- 1.8
- (double) minScale [read, write, assign, inherited] |
The minimum scale at which this layer is visible. If the map is zoomed out beyond this scale, the layer will not be visible.
- Since:
- 1.0
Implements AGSDynamicLayer.
- (NSString*) name [read, retain, inherited] |
The name of the layer. This property will be set by the framework when the layer is added to the map.
- Since:
- 1.8
- (AGSRenderer*) renderer [read, write, retain, inherited] |
AGSRenderer
assigned to the layer. It is responsible for symbolizing the graphics. It is optional as each graphic may have it's own symbol. If a graphic has a symbol, that will be used for drawing the graphic instead of the renderer.
- Since:
- 1.0
- (BOOL) renderNativeResolution [read, write, assign, inherited] |
Flag indicating if the layer renders at the native resolution. This property will not have any affect iOS devices without a retina display. If using an iOS device with a retina display and you want to take advantage of that display you can set this value to YES. The property must be set before the layer loads.
When rendering at the native resolution, this layer will use more memory (because the map images will be bigger).
- Since:
- 2.1
Implements AGSLayer.
Symbol used to display the selected vertex.
- Since:
- 1.8
- (BOOL) timeAware [read, assign, inherited] |
A property indicating whether the layer is time-aware.
- Since:
- 1.0
- (NSUndoManager*) undoManager [read, retain] |
The undo manager.
- Since:
- 1.8
- (AGSUnits) units [read, write, assign, inherited] |
The units the layer is in. Possible values include
AGSUnitsCentimeters
AGSUnitsDecimalDegrees
AGSUnitsDecimeters
AGSUnitsFeet
AGSUnitsInches
AGSUnitsKilometers
AGSUnitsMeters
AGSUnitsMiles
AGSUnitsMillimeters
AGSUnitsNauticalMiles
AGSUnitsPoints
AGSUnitsUnknown
AGSUnitsYards
- Since:
- 1.0
Symbol used to display the vertices.
- Since:
- 1.8