I want to access the coordinates:
{
"name":"String",
"type":"FeatureCollection",
"features":[
{"type":"Feature", "geometry": {"type":"Point", "coordinates":[10,11]}},
{...},
{...}]
}
I already tried:
var jsonfile = $.getJSON("myjsonfile.json");
for(var i = 0, l = jsonfile.features; i < l; i++) {
var obj = json.features[i];
console.log(obj.coordinates[1]);
}
But this doesn't work. I don't know why...