Skip to main content
Version: 7.3.0

point

描述

¥Description

根据 Position 创建 特性

¥Creates a Point Feature from a Position.

参数

¥Parameters

名称类型描述
coordinates位置经度、纬度位置(均以十进制度为单位)
properties?GeoJsonProperties要添加为属性的键值对对象(默认
options?对象可选参数(默认值:
options.bbox?BBox与要素关联的边界框数组 [西,南,东,北]
options.id?ID与特性关联的标识符

返回

¥Returns

特性<, GeoJsonProperties> 点要素

¥Feature<Point, GeoJsonProperties> a Point feature

示例

¥Examples

var point = turf.point([-75.343, 39.984]);

//=point

安装

¥Installation

$ npm install @turf/helpers

import { point } from "@turf/helpers";
const result = point(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.point(...);