I am overwhelmed, I can't read an external url (http://earthquake.usgs.gov/earthquakes/feed/geojson/1.0/hour) which contains geoJSON string. I attempted using this script:
.ajax({
type: "GET",
url: 'http://earthquake.usgs.gov/earthquakes/feed/geojson/1.0/hour',
dataType: 'json',
success: function(data) {
alert(data.features[0].properties.mag);
}
});
I also attempted using the URL plus '&callback=foo' and setting the foo function.
I don't know what to do in order to read this external url. I would like to read an obtain the json string or as text string. Please give me a hand to solve it.