Appearance
KBE3D / KBCore / turf / feature
函数: feature()
feature<
G,P>(geom:G|null,properties?:P,options?: {bbox?:BBox;id?:Id; }):Feature<G,P>
Function
Wraps a GeoJSON Geometry in a GeoJSON Feature.
类型参数
G
P
P extends GeoJsonProperties = GeoJsonProperties
参数
geom
G | null
properties?
P
an Object of key-value pairs to add as properties
options?
Optional Parameters
bbox?
Bounding Box Array [west, south, east, north] associated with the Feature
id?
Identifier associated with the Feature
返回
Feature<G, P>
a GeoJSON Feature
示例
ts
var geometry = {
"type": "Point",
"coordinates": [110, 50]
};
var feature = turf.feature(geometry);
//=feature