FusionTables 查询不返回任何内容
我正在尝试使用 Javascript 查询特定州,以便只有该州在 Google 地图上显示为 Fusion 表。这是不起作用的 Javascript:
var chicago = new google.maps.LatLng(41.850033, -87.6500523);
map = new google.maps.Map(document.getElementById('map_canvas'), { center: chicago, zoom: 4, mapTypeId: 'roadmap'});
var layer = new google.maps.FusionTablesLayer(531237, { query:"select geometry from 531237 where state_abbr = 'IL'"});
layer.setMap(map);
如果我从查询中删除 where 子句,则所有状态都会按预期返回。当我只想获取单一状态时,有人知道我做错了什么吗?
I'm trying to use Javascript to query a specific state so that only that state appears as a Fusion table on a Google Map. Here is the Javascript that doesn't work:
var chicago = new google.maps.LatLng(41.850033, -87.6500523);
map = new google.maps.Map(document.getElementById('map_canvas'), { center: chicago, zoom: 4, mapTypeId: 'roadmap'});
var layer = new google.maps.FusionTablesLayer(531237, { query:"select geometry from 531237 where state_abbr = 'IL'"});
layer.setMap(map);
If I remove the where clause from the query, all states are returned...as expected. Anyone know what I'm doing wrong when all I want to do is grab the single state?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,这些列必须是完全相同的情况。这是工作代码:
Turns out that the columns need to be the exact case. Here's the working code: