当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS FeatureLayer.featureReduction用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/layers/FeatureLayer"], (FeatureLayer) => { /* code goes here */ });

ESM: import FeatureLayer from "@arcgis/core/layers/FeatureLayer";

类: esri/layers/FeatureLayer

继承: FeatureLayer > Layer > Accessor

自从:用于 JavaScript 4.0 的 ArcGIS API

用法说明

FeatureLayer.featureReduction函数(或属性)的定义如下:


自从:ArcGIS 适用于 JavaScript 4.4 的 API

配置减少视图中点要素数量的方法。默认情况下,此属性为 null ,表示图层视图应绘制每个要素。

有两种类型的特征缩减:selectioncluster

  • Selection 仅适用于 SceneView 中的点,并涉及细化重叠特征,因此屏幕上没有任何特征相交。这从 4.4 版开始可用。
  • FeatureReductionCluster在空间上对点进行分组MapView进入集群.每个集群的大小与集群内的特征数量成正比。这从 4.14 版开始可用。

例子:

// clusters points based on their spatial proximity to other points
layer.featureReduction = {
  type: "cluster",
  clusterRadius: 100
};
// thins features in the view
layer.featureReduction = {
  type: "selection"
};

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 FeatureLayer.featureReduction。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。