I am using CoffeeScript to do a getJSON
request:
$.getJSON(
"http://maps.googleapis.com/maps/api/distancematrix/json?callback=?"
origins: origin
destinations: destinations
sensor: false
success: (data) ->
console.log data
error: (data) ->
console.log data
'json'
)
URL is:
http://maps.googleapis.com/maps/api/distancematrix/json?callback=?&origins=-25.8350643,28.1636066&destinations=-25.551836,%2028.423075|-25.218503,%2027.923075|&sensor=false
If you put that in your browser it will return the JSON, but the ajax request just tells me:
Uncaught SyntaxError: Unexpected token:
Any ideas?