4
我在將JSON數據作爲標記使用Angular時將問題實現到Google Maps中時出現問題。我的JSON數據是:使用AngularJS在Google Maps中實現標記
[
{
"_id": "TRK45679101121",
"timestamp": "2015-02-03T09:18:02.989Z",
"status": 1,
"path": [
{
"timestamp": 51422955082989,
"speed": 30,
"direction": 45.510029,
"longitude": 81.510029,
"latitude": 8.675009
}
]
},
{
"_id": "TRK456799",
"timestamp": "2015-02-03T09:18:02.989Z",
"status": 1,
"path": [
{
"timestamp": 51422955082989,
"speed": 30,
"direction": 45.510029,
"longitude": 81.510029,
"latitude": 8.675009
}
]
},
{
"_id": null,
"timestamp": "2016-01-22T08:10:43.238Z",
"status": null,
"path": null
}
]
您是否知道如何通過JavaScript閱讀此內容並將其集成到Google Maps API中?任何幫助將不勝感激,在此先感謝。
注:我只需要實現經緯度。如果點擊標記,需要顯示「_id」和「狀態」,我將在稍後討論。
謝謝!這正是我需要的。 :)但是,我有這個數據在API端點返回。有沒有辦法從端點調用角度腳本中的數據? –
是的,有,我也可以告訴你如何做到這一點:)但你應該先讀這個:[我應該怎麼做當有人回答我的問題?](http://stackoverflow.com/help/someone-answers ) – user2314737
哎呀,我的壞。道歉! –