Appearance
KBE3D / KBCore / turf / combine
函数: combine()
combine(
fc:FeatureCollection<Point|MultiPoint|LineString|MultiLineString|Polygon|MultiPolygon>):FeatureCollection<MultiPoint|MultiLineString|MultiPolygon, {collectedProperties:GeoJsonProperties[]; }>
Function
Combines a FeatureCollection of Point, LineString, or Polygon features into MultiPoint, MultiLineString, or MultiPolygon features.
参数
fc
FeatureCollection<Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon>
a FeatureCollection of any type
返回
FeatureCollection<MultiPoint | MultiLineString | MultiPolygon, { collectedProperties: GeoJsonProperties[]; }>
a FeatureCollection of corresponding type to input
示例
ts
var fc = turf.featureCollection([
turf.point([19.026432, 47.49134]),
turf.point([19.074497, 47.509548])
]);
var combined = turf.combine(fc);
//addToMap
var addToMap = [combined]