:cookie: 366 | @ezioda004 |http://www.freecodecamp.org/ezioda004
:cookie: 367 | @ezioda004 |http://www.freecodecamp.org/ezioda004
$.getJSON
, but you have that variable at the top of the JS panel that is trying to generate the URI using lat
and long
, and I'm guessing that they are not available, perhaps not in scope... Or just confused. You have the call to navigator.geolocation
up there at the top, but you have to synchronize with the return of the geolocation data before you can call the $.getJSON
function (I was confused because I see two different declaractions of api
and calls to navigator.geolocation
.) Remember that the geolocation code is asynchronous!