2 messages in com.googlegroups.google-calendar-help-dataapiRe: How do i display the location of ...
FromSent OnAttachments
Yaw Tandoh14 Dec 2007 14:06 
Austin (Google)17 Dec 2007 13:12 
Subject:Re: How do i display the location of an event for the google calendar api using javascript?
From:Austin (Google) (api.@google.com)
Date:12/17/2007 01:12:27 PM
List:com.googlegroups.google-calendar-help-dataapi

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();