Unable to retrieve 'location' property value of google.search.NewsSearch result
3 views
Skip to first unread message
Ashwani
unread,
Nov 10, 2009, 12:24:49 AM11/10/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google AJAX APIs
Hi All,
The API doc says that .location property of the NewsSearch result
contains the location of the news story. But I'm not getting any value
in it. I'm doing like this:
var results = newsSearch.results;
for (var i = 0; i < results.length; i++) {
var result = results[i];
alert("loc " + result.location);
var loc = document.createElement('td');
loc.appendChild(document.createTextNode(result.location));
container.appendChild(loc);
}
Is it a bug or I'm doing something wrong? Please can someone help.
thanks & Regards,
Ashwani
Jeff S (Google)
unread,
Nov 11, 2009, 1:40:17 PM11/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google AJAX APIs
Hi Ashwani,
I think that what you are seeing is expected behavior. For some
stories we do not have location information, so it is left blank in
the JSON result data.