Skip to content

描述 ​

geomReduce 的回调函数

首次调用回调函数时,提供的参数值取决于 reduce 方法是否有 initialValue 参数。

如果为 reduce 方法提供了 initialValue:

  • previousValue 参数为 initialValue。
  • currentValue 参数为数组中第一个元素的值。

如果未提供 initialValue:

  • previousValue 参数为数组中第一个元素的值。
  • currentValue 参数为数组中第二个元素的值。

定义 ​

function (

名称类型描述
previousValueReducer上次调用回调返回的累积值,如果提供了 initialValue 则为 initialValue。
currentGeometryGeometryObject当前正在处理的 Geometry。
featureIndexnumber当前正在处理的 Feature 的索引。
featurePropertiesGeoJsonProperties当前正在处理的 Feature 属性。
featureBBoxBBox当前正在处理的 Feature BBox。
featureIdId当前正在处理的 Feature Id。

)

返回值 ​

Reducer