PartCollection QML Type

A mutable collection of parts for creating a Multipart geometry from a MultipartBuilder. More...

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

Object

Properties

Signals

Methods

Detailed Description

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

Parts can be added to, inserted into, and removed from PartCollections in order to define or change the complete shape of a Multipart (for example a Polygon or Polyline).

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 PartCollection contains no parts (read-only).


size : int

Returns the number of parts in this PartCollection (read-only).


[default] spatialReference : SpatialReference

The spatial reference of the PartCollection.

Note: The spatial reference can only be changed while the PartCollection 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 addPart(Part part)

Adds a part to the PartCollection.

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


void addParts(list<Part> parts)

Adds a list of parts to the PartCollection.

This method was introduced in Esri.ArcGISRuntime 100.1.


int indexOf(Part part)

Gets the index of part.

Returns -1 if the part is not in the collection.


void insertPart(int index, Part part)

Inserts a part into the PartCollection at index.


Part part(int index)

Gets the part at index.

Returns null if the index is not valid.

See also setPart().


void removeAll()

Removes all the parts from this PartCollection.


void removePart(int index)

Removes the part at index.


void setPart(int index, Part part)

Reassigns the part at index to part.

See also part().


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