Hi,
getLocations() return an array of Where object with JavaScript API.
To
print out the string label of the first location of the array -
entry.getLocations()[0].getValueString();
Hope it helps,
Austin
On Dec 14, 2:06 pm, Yaw Tandoh <ygta...@gmail.com> wrote:
Hi y'all,
I'm trying to display the location of an event for the
google calendar api using javascript. However when i use the
getLocations() function and apply a .getText() to it i get an error.
Can someone please help me out. Thanks a lot.....i pasted part of my
code below...
var entries = feedRoot.feed.getEntries();
var eventDiv = document.getElementById('events');
if (eventDiv.childNodes.length > 0) {
eventDiv.removeChild(eventDiv.childNodes[0]);
}
var len = entries.length;
var label = '';
for (var i = 0; i < len; i++) {
var entry = entries[i];
var title = entry.getTitle().getText();
var startDateTime = null;
var startJSDate = null;
var times = entry.getTimes();
var desc = entry.getContent().getText();