propReduce
描述
¥Description
Reduce properties in any GeoJSON object into a single value, similar to how Array.reduce works.However, in this case we lazily run the reduction, so an array of all properties is unnecessary.
参数
¥Parameters
名称 | 类型 | 描述 |
---|---|---|
geojson | FeatureCollection | 特性 | 几何图形 | 任意 GeoJSON 对象 |
callback | propReduceCallback | a method that takes (previousValue, currentProperties, featureIndex) |
initialValue? | Reducer | Value to use as the first argument to the first call of the callback. |
返回
¥Returns
Reducer The value that results from the reduction.