0
votes
$.getJSON('http://dev.virtualearth.net/REST/v1/Locations/34.00689078318612,35.648735554695115?key=mykey&o=json', function () {
    alert('works!');
});

so this doesn't reach the alert(); and the request is "RED" in firebug console with no additional errors.

However just pasting the URL in the browser window returns valid JSON.

I am running out of ideas to try for this... What am I missing?

1

1 Answers

4
votes

Try this..

$.getJSON('http://dev.virtualearth.net/REST/v1/Locations/34.00689078318612,35.648735554695115?key=mykey&o=json&jsonp=?', function () {
  alert('works!');
});

Your code is failing due to the same origin policy. You must use JSONP to bypass this.