Google 融合 table where 子句

Google fusion table where clause

我正在开发一个允许用户 select 地图上的区域的应用程序。单击地图时,我将该地区的州和国家/地区存储在两个单独的数组中。我想对融合 table 应用查询,它只为我提供 selected 州和国家/地区的数据。

我尝试了以下两个针对国家和州的单独查询 selection。

var selectState = {
                    select: 'kml_4326',
                    from: 420419,
                    where: "'name_1' IN ('Montana','Nevada')"
                };

var selectCountry = {
                    select: 'kml_4326',
                    from: 420419,
                    where: "'name_0' IN ('Canada','Russia')"
                };

当我分别应用于融合 table 层时,两个查询都工作正常。我想合并这两个查询。我尝试了以下合并但不起作用:

 var selectStateAndCountry = {
                        select: 'kml_4326',
                        from: 420419,
                        where: "'name_0' IN ('Canada','Russia') AND 'name_1' IN  ('Montana','Nevada')"
                    };

请给我一个解决方案。谢谢

查询没有问题,但您的查询与任何行都不匹配(蒙大拿州和内华达州都不位于加拿大或俄罗斯)。

此查询将 return 结果:

{
    select: 'kml_4326',
    from: 420419,
    where: "'name_0' IN ('United States of America','Canada') " +
           " AND 'name_1' IN  ('Montana','Nevada')"
}