Note that there are some explanatory texts on larger screens.

plurals
  1. POUncaught Error: Invalid column index on Google Fusion table
    text
    copied!<p>I'm working on a Google maps project, and I'm having problems with accessing a Google Fusion Table. It's using the same kind of code as I used on another project, and that works fine, so I'm not sure what I'm doing wrong. </p> <p>It's not completely finished yet, but the page it's on is: <a href="http://www.tameside.gov.uk/admin/preview?rid=30360&amp;v=draft" rel="nofollow">http://www.tameside.gov.uk/admin/preview?rid=30360&amp;v=draft</a>, and once I open the nursery schools div (using the little plus in the corner) and click any of the nurseries, it throws up the error: "Uncaught Error: Invalid column index 4. Should be an integer in the range [0-3]." yet my table has 7 columns, so I don't know why it's only counting 4.</p> <p>The part of the code that's causing the error is here:</p> <pre><code>var schoolname = responsetable.getDataTable().getValue(row,0); var type = responsetable.getDataTable().getValue(row,1); var address = responsetable.getDataTable().getValue(row,2); var latitude = responsetable.getDataTable().getValue(row,3); var longitude = responsetable.getDataTable().getValue(row,4); var website = responsetable.getDataTable().getValue(row,5); var position = new google.maps.LatLng(latitude, longitude); </code></pre> <p>When I change rows 4 and 5 (longitude and website) to 3 (so it's only refencing the 4 rows is can see), it skips past this part and gives me an undefined error, so it's definitely this that is the problem. I'm hoping that the undefined error is related to this, or I might be returning here again.</p> <p>If anyone can help with this it would be greatly appreciated. If you'd like to see my table (and all it's columns) it's available at: <a href="https://www.google.com/fusiontables/DataSource?snapid=S643803i3hF" rel="nofollow">https://www.google.com/fusiontables/DataSource?snapid=S643803i3hF</a>. Also, if you spot any other issues in the code feel free to let me know, I'm assuming there'll be a few more, as I've not fully finished it yet.</p> <p>Thanks,</p> <p>James</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload