Skip to content

Instantly share code, notes, and snippets.

@caseycesari
Created August 23, 2014 00:52
Show Gist options
  • Save caseycesari/003a42d6b16ebc8f3870 to your computer and use it in GitHub Desktop.
Save caseycesari/003a42d6b16ebc8f3870 to your computer and use it in GitHub Desktop.
var my_url = "https://api.500px.com/v1/photos?feature=user&username=bzwemmer&consumer_key=ByGjMRRao3aAozGsq6HuxZmJfA6ufWzNL32VPplp";
var json = (function() {
var json = null;
$.ajax({
'async': false,
'global': false,
'url': my_url,
'dataType': "json",
'success': function (data){
json = data;
// window.json.photos[0].latitude - Path to latitude
GeoJSON.parse(json, {Point: ['photos[0].latitude', 'photos[0].longitude'], include: ['name']}, function(geojson){
console.log(JSON.stringify(geojson));
});
}
});
return json;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment