IonChangeDetectionService

Reads paginated results from a completed Cesium ion change detection report asset. This object is normally not instantiated directly, use IonChangeDetectionService.fromAssetId.

new Cesium.IonChangeDetectionService(options)

Name Type Description
options object Object with the following properties:
Name Type Description
assetId number The ion asset id.
resource Resource The report's paginated ion resource.
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:
Name Type Default Description
accessToken string Ion.defaultAccessToken optional The ion access token to use.
server string | Resource Ion.defaultServer optional The ion API server to use.
Returns:
A promise that resolves to the service for the report.
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:
Name Type Description
filter IonChangeDetectionService.Operation optional The operation to include. Omit to include all operations.
next string optional A link returned from a previous call to retrieve the next page of results.
Returns:
A promise that resolves to a page of changes. The promise rejects with a RequestErrorEvent if the request fails.
Throws:
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

Cesium.IonChangeDetectionService.Change

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.

Cesium.IonChangeDetectionService.ChangePage

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.

Cesium.IonChangeDetectionService.Operation

An operation reported by change detection. One of the following case-sensitive values:
  • "Inserted"
  • "Updated"
  • "Deleted"
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.