Hi all,
I asked a question the other day, but was a bit too in depth about the problem, which was confusing. Anyway, I've not made any progress, but wondered if a more succinct question could be answered by anyone.
I'm trying to display photos from a Flickr gallery using the 'flickr.galleries.getPhotos' API method. I have the desired response using JSON, but the images are not showing up on the screen. They displayed fine when using the 'flickr.groups.pools.getPhotos' method and I haven't changed any of the style code. Does anyone have any advice or suggestions as to why I'm having this problem with the galleries method in Flickr?
Regards, David
EDIT: Here is the JSON response:
jsonp1285580601727({
"photos": {
"page": 1,
"pages": 1,
"perpage": 500,
"total": 2,
"photo": [{
"id": "5017085065",
"owner": "7774535@N04",
"secret": "8c7b670148",
"server": "4154",
"farm": 5,
"title": "Woody",
"ispublic": 1,
"isfriend": 0,
"isfamily": 0,
"latitude": 0,
"longitude": 0,
"accuracy": 0,
"is_primary": 1,
"has_comment": 0,
"tags": "",
"url_sq": "http:\/\/farm5.static.flickr.com\/4154\/5017085065_8c7b670148_s.jpg",
"height_sq": 75,
"width_sq": 75,
"url_t": "http:\/\/farm5.static.flickr.com\/4154\/5017085065_8c7b670148_t.jpg",
"height_t": "100",
"width_t": "75",
"url_s": "http:\/\/farm5.static.flickr.com\/4154\/5017085065_8c7b670148_m.jpg",
"height_s": "240",
"width_s": "180",
"url_m": "http:\/\/farm5.static.flickr.com\/4154\/5017085065_8c7b670148.jpg",
"height_m": "500",
"width_m": "375"
},
{
"id": "5017083583",
"owner": "7774535@N04",
"secret": "d3e7f7bd36",
"server": "4130",
"farm": 5,
"title": "Sun article",
"ispublic": 1,
"isfriend": 0,
"isfamily": 0,
"latitude": 0,
"longitude": 0,
"accuracy": 0,
"is_primary": 0,
"has_comment": 0,
"tags": "",
"url_sq": "http:\/\/farm5.static.flickr.com\/4130\/5017083583_d3e7f7bd36_s.jpg",
"height_sq": 75,
"width_sq": 75,
"url_t": "http:\/\/farm5.static.flickr.com\/4130\/5017083583_d3e7f7bd36_t.jpg",
"height_t": "75",
"width_t": "100",
"url_s": "http:\/\/farm5.static.flickr.com\/4130\/5017083583_d3e7f7bd36_m.jpg",
"height_s": "180",
"width_s": "240",
"url_m": "http:\/\/farm5.static.flickr.com\/4130\/5017083583_d3e7f7bd36.jpg",
"height_m": "375",
"width_m": "500"
}]
},
"stat": "ok"
})
EDIT2: Here is the part of the javascript that is displaying the section:
$.each(week.images, function(i, item)
{
htmlString += '<li><a href="http://www.flickr.com/photos/' + item.owner + '/' + item.id + '" target="_blank">';
htmlString += '<img title="' + item.title + '" src="' + item.url_sq + '" alt="' + item.title + '" />';
htmlString += '</a></li>';
if(item.longitude == "0" && item.latitude == "0")
{
return true;
}
var latlng = new google.maps.LatLng(item.latitude, item.longitude);
var marker = new google.maps.Marker(
{
position: latlng,
map: map,
title:item.title
});
marker.content = '<a href="http://www.flickr.com/photos/' + item.owner + '/' + item.id + '" target="_blank"><img title="' + item.title + '" src="' + item.url_s + '" alt="' + item.title + '" /></a>';
markers.push(marker);
});
htmlString += '</ul>';
htmlString += '</div>';