Skip to main content
Version: Next

multiPoint

描述

¥Description

Creates a 特性<MultiPoint> based on a coordinate array.Properties can be added optionally.

¥Creates a Feature<MultiPoint> based on a coordinate array. Properties can be added optionally.

参数

¥Parameters

名称类型描述
coordinates数组<位置>位置数组
properties?GeoJsonPropertiesan Object of key-value pairs to add as properties (default )
options?对象可选参数(默认
options.bbox?BBoxBounding Box Array [west, south, east, north] associated with the Feature
options.id?IDIdentifier associated with the Feature

返回

¥Returns

特性<MultiPoint, GeoJsonProperties> a MultiPoint feature

¥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(...);