Skip to content

KBE3D / KBCore / turf / explode

函数: explode()

explode(geojson: AllGeoJSON): FeatureCollection<Point>

Function

Takes a feature or set of features and returns all positions as points.

参数

geojson

AllGeoJSON

input features

返回

FeatureCollection<Point>

points representing the exploded input features

抛出

if it encounters an unknown geometry type

示例

ts
var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);

var explode = turf.explode(polygon);

//addToMap
var addToMap = [polygon, explode]

KBE3D @3.0.0 Copyright © 2024-present KBE3D