multiPoint
描述
¥Description
基于坐标数组创建 特性<MultiPoint>。属性可选择性添加。
¥Creates a Feature<MultiPoint> based on a coordinate array. Properties can be added optionally.
参数
¥Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| coordinates | 数组<位置> | 位置数组 |
| properties? | GeoJsonProperties | 要添加为属性的键值对对象(默认 ) |
| options? | 对象 | 可选参数(默认值:) |
| options.bbox? | BBox | 与要素关联的边界框数组 [西,南,东,北] |
| options.id? | ID | 与特性关联的标识符 |
返回
¥Returns
特性<MultiPoint, GeoJsonProperties> 多点要素
¥Feature<MultiPoint, GeoJsonProperties> a MultiPoint feature
示例
¥Examples
var multiPt = turf.multiPoint([
[0, 0],
[10, 10],
]);
//=multiPt
安装
¥Installation
$ npm install @turf/helpers
import { multiPoint } from "@turf/helpers";
const result = multiPoint(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.multiPoint(...);