I'm trying to get earthquake data from USGS and I keep getting the error:
Uncaught SyntaxError: Unexpected token :
I tried $.ajax with jsonp format and I keep getting the same issue. I tried without callback at the end of my url as well, in that case I get the error:
MLHttpRequest cannot load http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson. Origin http://people.oregonstate.edu is not allowed by Access-Control-Allow-Origin.
$.getJSON(
"http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson&callback=?",
function(data) {
console.log(data);
}
);
can someone help me out how to get the data or perhaps something other than jQuery if it is not possible this way.