require(["esri/layers/support/BuildingSummaryStatistics"], (BuildingSummaryStatistics) => { /* code goes here */ });
import BuildingSummaryStatistics from "@arcgis/core/layers/support/BuildingSummaryStatistics.js";
esri/layers/support/BuildingSummaryStatistics
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
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
-
fields
fields BuildingFieldStatistics[]
-
An array of statistics on all fields in all sublayers.
-
loadError
loadError Errorreadonly
-
The Error object returned if an error occurred while loading.
- Default Value:null
-
loadStatus
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
-
A list of warnings which occurred while loading.
Method Overview
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 | ||
| BuildingSummaryStatistics | ||
| BuildingSummaryStatistics | ||
| BuildingSummaryStatistics | ||
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 | ||
| BuildingSummaryStatistics |
Method Details
-
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25Accessor 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();
ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey 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.
-
Cancels a load() operation if it is already in progress.
-
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.Parameterjson ObjectA 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.
ReturnsType Description * Returns a new instance of this class.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}
Inherited from AccessorSince: ArcGIS Maps SDK for JavaScript 4.25Accessor since 4.0, hasHandles added at 4.25. -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType 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
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.ReturnsType Description Boolean Indicates whether creating an instance of the class has been fulfilled (either resolved or rejected).
-
load
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 aLoadable
instance load status. When the signal is aborted, the instance does not stop its loading process, only cancelLoad can abort it.Parametersignal AbortSignaloptionalSignal 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
-
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25Accessor since 4.0, removeHandles added at 4.25. -
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");
-
toJSON
toJSON(){Object}
-
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
ReturnsType Description Object The ArcGIS portal JSON representation of an instance of this class.
-
when
when(callback, errback){Promise}
-
when()
may be leveraged once an instance of the class is created. This method takes two input parameters: acallback
function and anerrback
function. Thecallback
executes when the instance of the class loads. Theerrback
executes if the instance of the class fails to load.ParametersReturnsType 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
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 StringModel Name of the field. This can be used to identify certain special fields, like floor number, or phase id.
label StringLabel of the field.
min NumberMinimum value of the field for numeric values.
max NumberMaximum value of the field for numeric values.
List of the most frequent values of the field. This is not guaranteed to be a complete list of all values.
List of sublayer ids where this field is available.