Last active
June 2, 2016 16:40
-
-
Save jmwenda/73729855ebb70cd483c9078031465c68 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
function get_infowindow(data) { | |
var list = data['cdb_list'].split(','); | |
var the_data; | |
if (list.length == 1) { | |
var myobjects; | |
//var templateData = []; | |
var sql_link = "http://nation.cartodb.com/api/v1/sql?q=select cartodb_id, to_char(reported_date, 'DD Mon YYYY') reported_date, post_id from reports WHERE cartodb_id = " + data['cdb_list']+""; | |
$scope.hipsterIpsum = $.getJSON(sql_link); | |
$.getJSON(sql_link).then(function(theData) { | |
myobjects = theData | |
console.log("is this it?"); | |
console.log(theData); | |
}); | |
/*$scope.hipsterIpsum.done(function(data) { | |
console.log('We just promised'); | |
console.log(data); | |
myobjects = data; | |
});*/ | |
console.log('after the promise'); | |
console.log(myobjects); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment