-
aggregateGeometries
Object
- 自从:ArcGIS 适用于 JavaScript 4.23 的 API
当使用
envelope-aggregate
、centroid-aggregate
和/或convex-hull-aggregate
统计类型执行 statistics 查询时,aggregateGeometries 包含空间聚合几何。 aggregateGeometries 上的每个属性都填充有statistics field,其中包含与聚合统计类型匹配的聚合几何。例子:
// average of age fields by regions const ageStatsByRegion = new StatisticDefinition({ onStatisticField: field, outStatisticFieldName: "avgAge", statisticType: "avg" }); // extent encompassing all features by region const aggregatedExtent = new StatisticDefinition({ statisticType: "envelope-aggregate", outStatisticFieldName: "aggregateExtent", }); // group the statistics by Region field // get avg age by Regions and extent of each region const query = layer.createQuery(); query.groupByFieldsForStatistics = ["Region"]; query.outStatistics = [consumeStatsByRegion, aggregatedExtent]; layer.queryFeatures(query).then((results) => { results.features.forEach((feature) => { if (feature.attributes.Region === "Midwest") { view.goTo(feature.aggregateGeometries.aggregateExtent); } }); });
基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/Graphic"], (Graphic) => { /* code goes here */ });
ESM:
import Graphic from "@arcgis/core/Graphic";
类:
esri/Graphic
继承: Graphic > Accessor
自从:用于 JavaScript 4.0 的 ArcGIS API
用法说明
Graphic.aggregateGeometries
函数(或属性)的定义如下:
相关用法
- JavaScript ArcGIS Graphic.attributes用法及代码示例
- JavaScript ArcGIS Graphic.symbol用法及代码示例
- JavaScript ArcGIS Graphic.popupTemplate用法及代码示例
- JavaScript ArcGIS Graphic.geometry用法及代码示例
- JavaScript ArcGIS GraphicsLayer.opacity用法及代码示例
- JavaScript ArcGIS GraphicsLayer用法及代码示例
- JavaScript ArcGIS Graphic用法及代码示例
- JavaScript ArcGIS GraphicsLayer.on用法及代码示例
- JavaScript ArcGIS GraphicsLayerView.when用法及代码示例
- JavaScript ArcGIS GraphicsLayer.fullExtent用法及代码示例
- JavaScript ArcGIS GraphicsLayer.maxScale用法及代码示例
- JavaScript ArcGIS GraphicsLayer.visible用法及代码示例
- JavaScript ArcGIS GraphicsLayer layerview-create-error事件用法及代码示例
- JavaScript ArcGIS GraphicsLayer.effect用法及代码示例
- JavaScript ArcGIS GraphicsLayer.graphics用法及代码示例
- JavaScript ArcGIS GraphicsLayerView.queryGraphics用法及代码示例
- JavaScript ArcGIS GraphicsLayerView.highlight用法及代码示例
- JavaScript ArcGIS GraphicsLayer.when用法及代码示例
- JavaScript ArcGIS GraphicsLayer.minScale用法及代码示例
- JavaScript ArcGIS GraphicsLayer layerview-create事件用法及代码示例
- JavaScript ArcGIS Ground.loadAll用法及代码示例
- JavaScript ArcGIS GroupLayer.portalItem用法及代码示例
- JavaScript ArcGIS GroupLayer layerview-create事件用法及代码示例
- JavaScript ArcGIS GroupLayer.minScale用法及代码示例
- JavaScript ArcGIS GroupLayer.layers用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Graphic.aggregateGeometries。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。