I have some GeoJSON files for my APP, I used these files as my Vector Layers source , I put some extra data in files like name, Enabled and..., I use to reading this file each time I need some more info but the thing is I want to achieve this info using layer.getSource().getFeatures()[0].get('name')
but It wont work, how I can solve this problem
thanks
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "EPSG:3857" } },
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [1742479.7678, 3201115.597099997]
},
"Enabled": 1,
"volt": 0,
"id": 1,
}]}
I want to get this info by layer.getSource().getFeatures()[0].get('volt')