| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Example:
const changes = await Cesium.IonChangeDetectionService.fromAssetId(123456);
const page = await changes.listChanges({ filter: "Updated" });
if (Cesium.defined(page.next)) {
const nextPage = await changes.listChanges({ next: page.next });
console.log(nextPage.items);
}
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
See:
Members
The ion asset ID of the change detection report, not either of the compared assets.
Methods
async static Cesium.IonChangeDetectionService.fromAssetId(assetId, options) → Promise.<IonChangeDetectionService>
Creates an
IonChangeDetectionService for an existing, completed change detection report asset.
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
assetId |
number | The ion ID of the report asset, not either of the compared assets. | ||||||||||||
options |
object |
optional
Object with the following properties:
|
Returns:
A promise that resolves to the service for the report.
async listChanges(options) → Promise.<IonChangeDetectionService.ChangePage>
Retrieves a page of changes for this report, optionally filtered.
Results are paginated with a link. Request subsequent pages by passing
the returned
next as options.next until it is
undefined. The link already carries the filter of the first
request, so do not supply options.filter again.
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Object with the following properties:
|
Returns:
A promise that resolves to a page of changes. The promise rejects with a
RequestErrorEvent if the request fails.
Throws:
-
DeveloperError :
options.nextmust be a string.
Example:
const updated = [];
let page = await changes.listChanges({ filter: "Updated" });
updated.push(...page.items);
while (Cesium.defined(page.next)) {
page = await changes.listChanges({ next: page.next });
updated.push(...page.items);
}
Type Definitions
An entry from a change detection report.
Properties:
| Name | Type | Description |
|---|---|---|
id |
string | The identifier of the changed BIM/CAD instance. For elements, this matches the ID returned by IonAssetElementService.getElementId. |
operation |
IonChangeDetectionService.Operation | The reported operation. |
A page of results from
IonChangeDetectionService#listChanges.
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
items |
Array.<IonChangeDetectionService.Change> | The changes on this page. | |
next |
string |
<optional> |
The relative URL for the next page, or undefined when there are no more results. Pass it unchanged as options.next to IonChangeDetectionService#listChanges. |
An operation reported by change detection. One of the following
case-sensitive values:
"Inserted""Updated""Deleted"
