ElementService

Provides access to elements and their metadata in a model. This type describes an interface and is not intended to be instantiated directly.

abstract new Cesium.ElementService()

Experimental

This feature is not final and is subject to change without Cesium's standard deprecation policy.

See:

Methods

async aggregate(options) → Promise.<{aggregations: Array.<ElementService.Aggregation>, total: number}>

Computes aggregate statistics for element properties.
Name Type Description
options object Provider-specific aggregation options.
Returns:
A promise that resolves to the aggregate statistics.

async getElement(elementId) → Promise.<ElementService.Element>

Retrieves a single element.
Name Type Description
elementId string The element identifier.
Returns:
A promise that resolves to the element.

async getElementTreeChildren(options) → Promise.<{nodes: Array.<ElementService.ElementTreeNode>}>

Lists the children of a node in the element tree.
Name Type Description
options object optional Provider-specific tree query options.
Returns:
A promise that resolves to the child nodes.

async getElementTreeParents(elementId) → Promise.<{path: Array.<ElementService.ElementTreePathEntry>}>

Retrieves the path from the root of the element tree to an element.
Name Type Description
elementId string The element identifier.
Returns:
A promise that resolves to the root-first path.

async listElements(options) → Promise.<ElementService.ElementPage>

Retrieves a page of elements, optionally filtered.
Name Type Description
options object optional Provider-specific query options.
Returns:
A promise that resolves to a page of elements.

Type Definitions

Cesium.ElementService.Aggregation

Aggregate statistics for an element property.
Properties:
Name Type Attributes Description
propertyKey string <optional>
The property key these statistics describe.
count number The number of elements included in the statistics.
min number | null The minimum value, or null when unavailable.
max number | null The maximum value, or null when unavailable.
avg number | null The average value, or null when unavailable.
sum number The sum of the values.

Cesium.ElementService.Element

An element and its metadata. Implementations may include additional provider-specific fields.
Properties:
Name Type Attributes Description
id string The element identifier.
label string <optional>
The user-friendly label of the element, if any.
location ElementService.ElementLocation <optional>
The geographic location of this element, or undefined when the element has no location (e.g. conceptual elements, or assets with no geographic coordinate system).

Cesium.ElementService.ElementLocation

The geographic location of an ElementService.Element, present only when the element is geolocated.
Properties:
Name Type Description
center object The center of the element.
Properties
Name Type Description
longitude number The longitude in degrees.
latitude number The latitude in degrees.
height number The height in meters above the ellipsoid.
radius number The radius, in meters, of a sphere centered on center that bounds the element.

Cesium.ElementService.ElementPage

A page of elements returned by ElementService#listElements.
Properties:
Name Type Description
items Array.<ElementService.Element> The elements on this page.
total number | null The total number of matching elements, or null when the total is unavailable.

Cesium.ElementService.ElementTreeNode

A node in an element tree.
Properties:
Name Type Description
label string The user-friendly label of this node.
hasChildren boolean Whether this node has any children.
id string The identifier of the element represented by this node.

Cesium.ElementService.ElementTreePathEntry

An entry in a root-first element tree path.
Properties:
Name Type Description
id string The identifier represented by this entry.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.