var pointGroup = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.09404754638672,
50.96615714459998
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.10400390625,
50.96410303227502
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.09696578979492,
50.96080545150975
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.08615112304688,
50.96210288826351
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.08906936645508,
50.973778188690716
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.07559394836426,
50.96896788796588
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
-114.08005714416504,
50.975669743502245
]
}
}
]
}
var polygons = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"id":'1'},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-114.0913438796997,
50.96538686312194
],
[
-114.09936904907225,
50.961346054560266
],
[
-114.08975601196289,
50.95458806431627
],
[
-114.08288955688475,
50.95977828838435
],
[
-114.08580780029297,
50.965832817113345
],
[
-114.0913438796997,
50.96538686312194
]
]
]
}
},
{
"type": "Feature",
"properties": {
"id":'2',
"stroke": "#555555",
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#555555",
"fill-opacity": 0.5
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-114.08580780029297,
50.965832817113345
],
[
-114.08085107803345,
50.9657517348879
],
[
-114.08452033996582,
50.97110285820415
],
[
-114.09374713897704,
50.96863006722691
],
[
-114.09132242202759,
50.965373349297785
],
[
-114.08580780029297,
50.965832817113345
]
]
]
}
}
]
}
const combinedGeoJson = {
"type": "FeatureCollection",
"features": [...pointGroup.features,...polygons.features]
}
console.log(combinedGeoJson)