{
"名称":"明尼苏达大学扩展",
"日期时间":" 1914-00-00T00:00:00&#34 ;,
"纬度":44.982515,
"经度": - 93.17489,
"大小":2
}
{
"几何" :{
"类型":"点&#34 ;,
"坐标":[
44.982515,
-93.17489
]
},
"键入":"功能",
"属性":{
"尺寸":2,
" datetime":" 1914-00-00T00:00:00"
}
}
我完全不知道如何传输数据格式,请帮忙!
答案 0 :(得分:2)
使用类似的东西:
records = `your original list`
newrecords = []
for (var i=0; i<records.length;i++)
{
var newrecord = {
"geometry" : {
"type":"Point",
"coordinates": [records[i].Latitude,records[i].Longitude]
},
"type": "Feature",
"properties": {
"size": records[i].size,
"datetime": records[i].datetime
}
}
newrecords.push(newrecord)
}