Get Local pics from panoramio
by Jorgelig
HTML
<div id="response">
</div>
<div id="photos">
</div>
JavaScript
var lat = 25.68644;
var lng = -100.29787;
var acc = 0.0020;
var photoSize = 'medium'; //'original';
$.ajax({
type: 'get',
dataType: 'jsonp',
url: 'http://www.panoramio.com/map/get_panoramas.php?set=public&from=0&to=20&minx=' + (lng - acc) + '&miny=' + (lat - acc) + '&maxx=' + (lng + acc) + '&maxy=' + (lat + acc) + '&size=' + photoSize + '&mapfilter=true',
success: function(response){
console.log(response);
$("#photos").html('');
$("#response").html(response.count);
$.each(response.photos, function(index, photo){
$("#photos").append('<img title="' + photo.photo_title + '" src="' + photo.photo_file_url + '"/>');
});
}
});