Appearance
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
input features
返回
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]