方法概述
名称 | 返回值类值 | 描述 | 对象 |
---|---|---|---|
Promise<Schemes> | 生成要在 FeatureLayer 的 featureReduction 属性中进行设置的默认 labelingInfo 方案。 更多详情 | bins |
方法详细说明
-
生成要在 FeatureLayer 的 featureReduction 属性中进行设置的默认 labelingInfo 方案。根据 FeatureReductionBinning 的渲染器返回一个或多个建议的 LabelClasses。
参数规范params Object有关可能传递给此函数的每个参数的详细信息,请参阅下表。
规范已启用或将启用图格化的点图层。
renderer Rendereroptional启用图格化时,
layer.featureReduction.renderer
上设置的渲染器。返回类型 描述 Promise<Schemes> 返回一个对象,其中包含要在图层的 featureReduction
属性上设置的建议的主要标注和次要标注方案。示例// Sets a suggested label scheme for the binning config based on its renderer const { primaryScheme } = await binLabelCreator.getLabelSchemes({ layer: featureLayer }); const featureReduction = featureLayer.featureReduction.clone(); featureReduction.labelingInfo = primaryScheme.labelingInfo; featureLayer.featureReduction = featureReduction;
类型定义
-
Scheme
-
包含要在图层的 featureReduction.labelingInfo 上设置的建议 labelingInfo。
- 属性
-
name String
生成的图格化标记方案的名称。这可在 web 地图创作应用程序的 UI 中使用。
fieldName String标记方案中使用的聚合字段的名称。这可在 web 地图创作应用程序的 UI 中使用。
labelingInfo LabelClass[]要在图层的 featureReduction.labelingInfo 属性上设置的一组 LabelClass 对象。
-
Schemes
-
getLabelSchemes() 方法返回的对象。
- 属性
-
primaryScheme Scheme
包括为输入图层的图格建议的主要标记方案。
包括为输入图层的图格建议的次要标记方案。