0
我有一个功能列表,我想创建一个FeatureCollection将它们分组在一个字符串中,这些功能来自不同类型(多边形,线条和点)。从多个GeoJSON字符串创建FeatureCollection
这里是他们是如何写的:
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
-31.640625,
15.623036831528264
],
[
-2.8125,
-14.264383087562637
],
[
-22.5,
-30.751277776257812
],
[
-30.937499999999996,
-38.54816542304657
]
]
}
}
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-24.960937499999996,
29.84064389983441
],
[
-2.109375,
21.616579336740603
],
[
2.4609375,
43.068887774169625
],
[
-31.289062500000004,
49.38237278700955
],
[
-24.960937499999996,
29.84064389983441
]
]
]
}
}
是否有一个JavaScript函数,这个交易,我很卡就可以了。
不,我不具备的特征字符串数组,他们localted在数据库: '{“type”:“Feature”,“properties”:{},...}''{“type”:“Feature”,“properties”:{},...}' – geoinfo
在这种情况下,我想我必须把它们放在一个数组中,你有什么想法吗? – geoinfo