BuildingSummaryStatistics

AMD: require(["esri/layers/support/BuildingSummaryStatistics"], (BuildingSummaryStatistics) => { /* code goes here */ });
ESM: import BuildingSummaryStatistics from "@arcgis/core/layers/support/BuildingSummaryStatistics.js";
Class: esri/layers/support/BuildingSummaryStatistics
Inheritance: BuildingSummaryStatisticsAccessor
Since: ArcGIS Maps SDK for JavaScript 4.15

Contains statistics about the fields in all sublayers of a BuildingSceneLayer. The statistics contain the most frequent values in that layer, minimum and maximum values in case they are numeric and the sublayers where the field is available.

This class can't be instantiated, use it as part of the BuildingSceneLayer.summaryStatistics property:

// load the layer
buildingLayer.load().then(function() {
 // load the statistics on the summaryStatistics property
 // to be able to access them
 buildingLayer.summaryStatistics.load().then(function() {
   console.log(buildingLayer.summaryStatistics);
 });
});
See also

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

The name of the class.

Accessor

An array of statistics on all fields in all sublayers.

BuildingSummaryStatistics

The Error object returned if an error occurred while loading.

BuildingSummaryStatistics

Represents the status of a load operation.

BuildingSummaryStatistics

A list of warnings which occurred while loading.

BuildingSummaryStatistics

Property Details

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

fields

Property
fields BuildingFieldStatistics[]

An array of statistics on all fields in all sublayers.

loadError

Property
loadError Errorreadonly

The Error object returned if an error occurred while loading.

Default Value:null

loadStatus

Property
loadStatus Stringreadonly

Represents the status of a load operation.

Value Description
not-loaded The object's resources have not loaded.
loading The object's resources are currently loading.
loaded The object's resources have loaded without errors.
failed The object's resources failed to load. See loadError for more details.

Possible Values:"not-loaded" |"loading" |"failed" |"loaded"

Default Value:"not-loaded"

loadWarnings

Property
loadWarnings Object[]readonly

A list of warnings which occurred while loading.

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor

Cancels a load() operation if it is already in progress.

BuildingSummaryStatistics
*

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

BuildingSummaryStatistics

Returns true if a named group of handles exist.

Accessor

isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).

BuildingSummaryStatistics

isRejected() may be used to verify if creating an instance of the class is rejected.

BuildingSummaryStatistics

isResolved() may be used to verify if creating an instance of the class is resolved.

BuildingSummaryStatistics
Promise

Loads the resources referenced by this class.

BuildingSummaryStatistics

Removes a group of handles owned by the object.

Accessor

Converts an instance of this class to its ArcGIS portal JSON representation.

BuildingSummaryStatistics
Promise

when() may be leveraged once an instance of the class is created.

BuildingSummaryStatistics

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, addHandles added at 4.25.

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

cancelLoad

Method
cancelLoad()

Cancels a load() operation if it is already in progress.

fromJSON

Method
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
Type Description
* Returns a new instance of this class.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, hasHandles added at 4.25.

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

isFulfilled

Method
isFulfilled(){Boolean}

isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, true will be returned.

Returns
Type Description
Boolean Indicates whether creating an instance of the class has been fulfilled (either resolved or rejected).

isRejected

Method
isRejected(){Boolean}

isRejected() may be used to verify if creating an instance of the class is rejected. If it is rejected, true will be returned.

Returns
Type Description
Boolean Indicates whether creating an instance of the class has been rejected.

isResolved

Method
isResolved(){Boolean}

isResolved() may be used to verify if creating an instance of the class is resolved. If it is resolved, true will be returned.

Returns
Type Description
Boolean Indicates whether creating an instance of the class has been resolved.

load

Method
load(signal){Promise}

Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance.

This method must be called by the developer when accessing a resource that will not be loaded in a View.

The load() method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.

It's possible to provide a signal to stop being interested into a Loadable instance load status. When the signal is aborted, the instance does not stop its loading process, only cancelLoad can abort it.

Parameter
signal AbortSignal
optional

Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.

Returns
Type Description
Promise Resolves when the resources have loaded.

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, removeHandles added at 4.25.

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

toJSON

Method
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

when

Method
when(callback, errback){Promise}

when() may be leveraged once an instance of the class is created. This method takes two input parameters: a callback function and an errback function. The callback executes when the instance of the class loads. The errback executes if the instance of the class fails to load.

Parameters
callback Function
optional

The function to call when the promise resolves.

errback Function
optional

The function to execute when the promise fails.

Returns
Type Description
Promise Returns a new promise for the result of callback that may be used to chain additional functions.
Example
// Although this example uses MapView, any class instance that is a promise may use when() in the same way
let view = new MapView();
view.when(function(){
  // This function will execute once the promise is resolved
}, function(error){
  // This function will execute if the promise is rejected due to an error
});

Type Definitions

BuildingFieldStatistics

Type Definition
BuildingFieldStatistics Object

Summary statistics for a field in a BuildingSceneLayer. The statistics contain the most frequent values in that layer, minimum and maximum values in case they are numeric and the sublayers where the field is available.

Properties
fieldName String

Name of the field.

modelName String

Model Name of the field. This can be used to identify certain special fields, like floor number, or phase id.

label String

Label of the field.

min Number

Minimum value of the field for numeric values.

max Number

Maximum value of the field for numeric values.

mostFrequentValues String[]|Number[]

List of the most frequent values of the field. This is not guaranteed to be a complete list of all values.

subLayerIds Number[]

List of sublayer ids where this field is available.

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