我是Javascript新手,因此我有點迷路。我能夠從GeoJSON文件讀取;但是,我不明白如何遍歷文件以獲取點的Lat-Long,然後在Leaflet中將這些點顯示爲標記。我希望能也使用該插件真棒標記(基於字體真棒,對於單張)從GeoJSON文件中讀取緯度和經度,然後用小冊子顯示每個lat-long作爲標記
這是我GeoJSON的文件的樣本:
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "Street Nam": "Aljunied Avenue 2", " Block": "118 Aljunied Avenue 2", " Postal Co": "380118", " Latitude": 1.320440, "Longitude": 103.887575 },
"geometry": { "type": "Point", "coordinates": [ 103.887575, 1.320440 ] } }
,
{ "type": "Feature", "properties": { "Street Nam": "Aljunied Crescent", " Block": "97A Aljunied Crescent", " Postal Co": "381097", " Latitude": 1.321107, "Longitude": 103.886127 },
"geometry": { "type": "Point", "coordinates": [ 103.886127, 1.321107 ] } }
]
}
感謝您的關注和時間=)