|
ArcGIS Runtime SDK for iOS
100.15
|
Mutable collection of points of a multipoint geometry builder.
Instances of this class represent a mutable collection of points of a multipoint geometry builder (AGSMultipointBuilder).
This class adopts NSFastEnumeration which permits the collection to be enumerated conveniently using a for-in loop. For example -
This class also provides subscripting support. So you can access points using the subscript syntax. For example -
AGSMultipointBuilder for multipoint geometry builder
Instance Methods | |
| (NSInteger) | - addPoint: |
| (void) | - addPoints: |
| (NSInteger) | - addPointWithX:y: |
| (NSInteger) | - addPointWithX:y:z: |
| (NSArray< AGSPoint * > *) | - array |
| (void) | - enumerateXYCoordinatesUsingBlock: |
| (NSInteger) | - indexOfPoint: |
| (instancetype) | - initWithSpatialReference: |
| (void) | - insertPoint:atIndex: |
| (void) | - insertPointWithX:y:atIndex: |
| (void) | - insertPointWithX:y:z:atIndex: |
| (AGSPoint *) | - objectAtIndexedSubscript: |
| (AGSPoint *) | - pointAtIndex: |
| (AGSEnumerator *) | - pointEnumerator |
| (void) | - removeAllPoints |
| (void) | - removePointAtIndex: |
| (void) | - setObject:atIndexedSubscript: |
| (void) | - setPoint:atIndex: |
Class Methods | |
| (instancetype) | + pointCollectionWithSpatialReference: |
Properties | |
| NSInteger | count |
| BOOL | isEmpty |
| AGSSpatialReference * | spatialReference |
| - (NSInteger) addPoint: | (AGSPoint *) | point |
Add a point to the end of this collection.
| point | to add. |
0 is the first position. | - (void) addPoints: | (NSArray< AGSPoint * > *) | points |
Add points from the provided array to the end of this collection.
| points | to add. |
| - (NSInteger) addPointWithX: | (double) | x | |
| y: | (double) | y | |
Add a point to the end of this collection.
| x | coordinate of the point. |
| y | coordinate of the point. |
0 is the first position. | - (NSInteger) addPointWithX: | (double) | x | |
| y: | (double) | y | |
| z: | (double) | z | |
Add a point to the end of this collection.
| x | coordinate of the point. |
| y | coordinate of the point. |
| z | coordinate of the point. |
0 is the first position. | - (NSArray<AGSPoint*>*) array |
Returns an array of points.
| - (void) enumerateXYCoordinatesUsingBlock: | (void(^)(NSUInteger index, double x, double y)) | block |
Allows you to enumerate the X and Y coordinates of this point collection with a block. This is faster than other ways of enumerating the part that give out AGSPoint instances.
| - (NSInteger) indexOfPoint: | (AGSPoint *) | point |
Returns the index of the specified point.
| point | whose index needs to be located. |
| - (instancetype) initWithSpatialReference: | (nullable AGSSpatialReference *) | spatialReference |
Initialize a collection with specified spatial reference. All points that belong to this collection must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.
| spatialReference | of the collection. |
| - (void) insertPoint: | (AGSPoint *) | point | |
| atIndex: | (NSInteger) | index | |
Insert a point at the specified position.
| point | to insert. |
| index | of desired position. 0 is the first position. |
| - (void) insertPointWithX: | (double) | x | |
| y: | (double) | y | |
| atIndex: | (NSInteger) | index | |
Insert a point at the specified position.
| x | coordinate of the point. |
| y | coordinate of the point. |
| index | of desired position. 0 is the first position. |
| - (void) insertPointWithX: | (double) | x | |
| y: | (double) | y | |
| z: | (double) | z | |
| atIndex: | (NSInteger) | index | |
Insert a point at the specified position.
| x | coordinate of the point. |
| y | coordinate of the point. |
| z | coordinate of the point. |
| index | of desired position. 0 is the first position. |
| - (AGSPoint*) objectAtIndexedSubscript: | (NSInteger) | idx |
Returns the point at the specified index. Supports accessing an individual point using array-style subscript expressions.
| idx | An index within the bounds of the collection. |
| - (AGSPoint*) pointAtIndex: | (NSInteger) | index |
Returns the point at the specified index.
| index | An index within the bounds of the collection. |
| + (instancetype) pointCollectionWithSpatialReference: | (nullable AGSSpatialReference *) | spatialReference |
Create a new collection with specified spatial reference. All points that belong to this collection must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.
| spatialReference | of the collection. |
| - (AGSEnumerator*) pointEnumerator |
Returns an enumerator object that lets you access each object in the point collection.
| - (void) removeAllPoints |
Remove all points from this collection.
| - (void) removePointAtIndex: | (NSInteger) | index |
Remove point at specified position.
| index | of desired position. 0 is the first position. |
| - (void) setObject: | (AGSPoint *) | obj | |
| atIndexedSubscript: | (NSInteger) | idx | |
Sets the point at the specified index. Supports assigning an individual point using array-style subscript expressions. For example -
| obj | segment to set |
| idx | subscript index |
| - (void) setPoint: | (AGSPoint *) | point | |
| atIndex: | (NSInteger) | index | |
Replace existing point with the specified one.
| point | to replace with. |
| index | of point to replace. |
|
readnonatomicassign |
The number of points in the collection.
|
readnonatomicassign |
Indicates whether the collection is empty or not.
|
readnonatomicstrong |
The spatial reference associated with points in the collection. It specifies the coordinate system for each point's x & y coordinate values. All points in this collection must have the same spatial reference, or if they don't have a spatial reference, it will be assumed that they contain coordinates that match this spatial reference.