描述
propReduce 的回调函数
首次调用回调函数时,提供的参数值取决于 reduce 方法是否有 initialValue 参数。
如果为 reduce 方法提供了 initialValue:
- previousValue 参数为 initialValue。
- currentValue 参数为数组中第一个元素的值。
如果未提供 initialValue:
- previousValue 参数为数组中第一个元素的值。
- currentValue 参数为数组中第二个元素的值。
定义
function (
| 名称 | 类型 | 描述 |
|---|---|---|
| previousValue | Reducer | 上次调用回调返回的累积值,如果提供了 initialValue 则为 initialValue。 |
| currentProperties | GeoJsonProperties | 当前正在处理的属性。 |
| featureIndex | number | 当前正在处理的 Feature 的索引。 |
)
返回值
Reducer