coordAll
描述
🌐 Description
从任意 GeoJSON 对象获取所有坐标。
🌐 Get all coordinates from any GeoJSON object.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| geojson | AllGeoJSON | 任何 GeoJSON 对象 |
返回
🌐 Returns
示例
🌐 Examples
var features = turf.featureCollection([
turf.point([26, 37], { foo: "bar" }),
turf.point([36, 53], { hello: "world" }),
]);
var coords = turf.coordAll(features);
//= [[26, 37], [36, 53]]
安装
🌐 Installation
$ npm install @turf/meta
import { coordAll } from "@turf/meta";
const result = coordAll(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.coordAll(...);