下降融合表 [英] Drop down fusion table

查看:163
本文介绍了下降融合表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用大约50列的融合表中的下拉框选择用户定义的列。该列应该用于进一步查询。是否有任何方法可以做到这一点。我是Google地图API的新手。

How to select user defined column using drop down box from fusion table which has around 50 columns.That column should be used for further queries.Is there any way to do it.I am new to Google map API.

推荐答案

你是否说你不想在html中对列名进行硬编码?你想通过javascript获取列名称?如果是这样,你需要使用JSONP API。我发布了几个例子,可以修改它们以从FT中检索列名。
将查询更改为:

Are you saying you don't want to hard-code the column names in your html? You want to get the columns names via javascript? If so you'll need to use the JSONP API. I've posted several examples which could be modified to just retrieve the column names from a FT. Change the query to:

var query = "SELECT * FROM " + table_id + " LIMIT 1";

您的JSONP回调(在这些示例中称为example_dataHandler(d))将获得一个列名称数组:

Your JSONP callback (called example_dataHandler(d) in those examples) will get an array of column names:

 var colnames = [];
 colnames = d.table.cols;

这篇关于下降融合表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆