Filter current value of a Fusion Table Query

不羁的心 提交于 2019-12-12 05:48:39

问题


With much help, I have created this Map with data from Queries to a Fusion Table.

http://www.vciregionmap.com

I am now being asked to add a brand filter into the map that filters and persists the filtered value that is selected, as the user chooses new Regions and Districts.

So if I choose - Region > NorthEast and then select Bentley, only those Bentley locations would be shown and if I then switched to Region SouthEast, District 61, it would still show only Bentley locations, until I reset the map.

I have the brand filter in a select menu and have the filter working, but not by current location or values and I dont know how to reset the brand select to return all brands. I had a version of this working with different code here: http://vciregionmap.com/_old/

This is the function I am using now:

 function filterBrand(term) {
 layer.setOptions({query:{select:'Brand',
                       from:FT_TableID,
                       where:"Brand = '"+term+"'"
                       }

});
var queryStr = "SELECT 'Brand', 'Brand' FROM "+FT_TableID+" WHERE Brand = '"+term+"'";

}

google.maps.event.addDomListener(document.getElementById('brand-select'),
        'change', function() {
          updateMap(layer, tableId, Brand);
    });

google.maps.event.addDomListener(window, 'load', initialize);

来源:https://stackoverflow.com/questions/11696084/filter-current-value-of-a-fusion-table-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!