A list model storing a list of key-value pairs to be used as attributes for a Feature or Graphic. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Properties
- attributeNames : list<string>
- attributesJson : jsobject
- count : int
- error : Error
Signals
Methods
- var attributeValue(string attributeName)
- bool containsAttribute(string attributeName)
- bool equals(AttributeListModel other)
- void insertAttribute(string attributeName, var attributeValue)
- void removeAllAttributes()
- void removeAttribute(string attributeName)
- void replaceAttribute(string attributeName, var attributeValue)
Detailed Description
Note: You cannot declare or create a component of this type in QML code.
Modifying this model (adding or removing) will update the attributes available in the feature or graphic.
The model returns data for the following roles:
Role | Type | Description |
---|---|---|
attributeName | string | The name/key for the attribute. |
attributeValue | var | The value for the attribute. |
Property Documentation
The attributes as a JSON representation.
Providing attributes as JSON will replace all attributes in the model with the specified JSON attributes.
error : Error |
Returns the last error that occurred on the model (read-only).
Signal Documentation
Emitted when the attributeNames property changes.
Note: The corresponding handler is onAttributeNamesChanged
.
Emitted when the attributesJson property changes.
Note: The corresponding handler is onAttributesJsonChanged
.
Emitted when the count property changes.
Note: The corresponding handler is onCountChanged
.
Emitted when the error property changes, which can indicate that an error occurred.
Note: The corresponding handler is onErrorChanged
.
Method Documentation
Returns true
if the model contains the provided attributeName.
bool equals(AttributeListModel other) |
Returns true
if this AttributeListModel is equal to other.
Inserts the value attributeValue of the attribute named attributeName.
Removes the attribute named attributeName from the model.
Replaces the value attributeValue of the attribute named attributeName.