PointCollection QML Type

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

Import Statement: import Esri.ArcGISRuntime 100.15
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 point)

Adds point to the PointCollection.

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


int addPointXY(double 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(double 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(jsobject 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 point)

Gets the index of point.

Returns the index or -1 if not found.


void insertPoint(int pointIndex, Point point)

Inserts a point at pointIndex.


void insertPointXY(int 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(int 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(int 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(int pointIndex)

Removes the point at pointIndex.


void setPoint(int pointIndex, Point point)

Reassigns the point at pointIndex to point.

See also point().


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.