lukesanch / timemap

Automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

Handling data from a Google Spreadsheet when data isn't on first sheet #106

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have multiple google spreadsheet sheets with data not on the first one 
2. Publish sheet to web
3. Try and read data to timemap

My fix was to change line 77 of google_spreadsheet.js

 if (!loader.opts.url){ 

to 

// use key if no URL was supplied
    if (!loader.opts.url && options.key) {
        loader.opts.url = "http://spreadsheets.google.com/feeds/list/" + 
            options.key + "/"+ options.sheet + "/public/values?alt=json-in-script&callback=?";
    }

adding a sheet option to the initial data initialisation

Working example here http://hawksey.info/maps/CaPReT.html

Original issue reported on code.google.com by m.hawk...@gmail.com on 30 Jan 2012 at 3:28

GoogleCodeExporter commented 8 years ago
This looks right, but it's not really a bug. The URL completion - taking the 
key and sticking it into the URL for you - is really just a small utility; you 
can do what you need, without modifying the library, just by passing it the 
full URL instead of the spreadsheet key. 

Original comment by nick.rab...@gmail.com on 30 Jan 2012 at 4:53