Skip To Content ArcGIS for Developers Sign In Dashboard

PointCollection QML Type

Represents a mutable collection of Points for creating a Multipoint geometry from a MultipointBuilder. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

Points can be added to, inserted into, and removed from the collection in order to define or change the shape of the Multipoint.

The spatial reference must be set before adding points and cannot be changed after the collection contains points.

The spatial reference of any points added to a PointCollection must match that of the PointCollection, or be unspecified (in which case the Points are assumed to have the same spatial reference as the PointCollection).

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

Property Documentation

empty : bool

Returns whether this PointCollection contains no points (read-only).


size : int

Returns the number of points contained in this PointCollection (read-only).


[default] spatialReference : SpatialReference

The spatial reference of this PointCollection.

The spatial reference can only be changed while this PointCollection is empty.

See also empty.


Signal Documentation

emptyChanged()

Emitted when the empty property changes.

Note: The corresponding handler is onEmptyChanged.


sizeChanged()

Emitted when the size property changes.

Note: The corresponding handler is onSizeChanged.


spatialReferenceChanged()

Emitted when the spatialReference property changes.

Note: The corresponding handler is onSpatialReferenceChanged.


Method Documentation

int addPoint(point)

Adds point to the PointCollection.

Returns the index where the point was added or -1 on error.


int addPointXY(x, double y)

Adds a point with the given x and y coordinates.

Returns the index where the point was added, or -1 on error.

The coordinates must be in the spatial reference of the PointCollection.


int addPointXYZ(x, double y, double z)

Adds a point to this PointCollection from x, y and z values.

Returns the index where the point was added, or -1 on error.

The coordinates must be in the spatial reference of this PointCollection.


void addPoints(points)

Adds the point collection points to this PointCollection.

Points can be either a PointCollection, an ImmutablePointCollection or an array of Point.


int indexOf(point)

Gets the index of point.

Returns the index or -1 if not found.


void insertPoint(pointIndex, Point point)

Inserts a point at pointIndex.


void insertPointXY(pointIndex, double x, double y)

Inserts a point with the given x and y coordinates at pointIndex.

The coordinates must be in the spatial reference of this PointCollection.


void insertPointXYZ(pointIndex, double x, double y, double z)

Inserts a point with the given x, y and z coordinates at pointIndex.

The coordinates must be in the spatial reference of this PointCollection.


Point point(index)

Gets the point at index.

Returns null if the index is not valid.

See also setPoint().


void removeAll()

Removes all points and segments from this PointCollection.


void removePoint(pointIndex)

Removes the point at pointIndex.


void setPoint(pointIndex, Point point)

Reassigns the point at pointIndex to point.

See also point().



Feedback on this topic?