Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save James-E-Adams/45084eab6dea67e0afcae5682536a297 to your computer and use it in GitHub Desktop.
Save James-E-Adams/45084eab6dea67e0afcae5682536a297 to your computer and use it in GitHub Desktop.
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