Created
July 3, 2016 05:44
-
-
Save James-E-Adams/45084eab6dea67e0afcae5682536a297 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "http://free.rome2rio.com/api/1.4/json/Search?"; | |
function runner(long,lati) { | |
//get the response with given long lat: | |
var data = { | |
key: destination.key, | |
dPos: destination.position, | |
oPos: { | |
lat: lati, | |
lng: long | |
} | |
}; | |
console.log('cheese'); | |
var response; | |
$.getJSON(url, data, function (data, status) { | |
console.log("status is : " + status); | |
if (status === "success") { | |
response=data; | |
//console.log('this is data' + data); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment