Retrieving JSON throws error: Unexpected token :
问题 I'm retrieving the elevation data from the Google Maps API by AJAX. I'm getting the data back I want as if I look at the console in Chrome I can see a 200 status code and can see the data in the response tab. But is throws up 'Uncaught SyntaxError: Unexpected token :' so I can't display anything from the JSON file. This is my code: var theURL = 'http://maps.googleapis.com/maps/api/elevation/json?locations=' + longitude + ',' + latitude + '&sensor=false&callback=?'; $.ajax({ url: theURL, type: