Home > Geopedia API > setFilters

setFilters

Sets or removes current layer filters.

Command JSON members:

  • command: "setFilters"
  • filters: advanced JS filter array

Error response is returned, when an error happened, otherwise no response is returned.

Example:


var allTableFilters = [ 
     { tableId : 456, filter : combineFilters(getCombinedFiltersForTable(456), "AND") }, 
     { tableId : 516, filter : combineFilters(getCombinedFiltersForTable(516), "AND") }, 
     { tableId : 505, filter : combineFilters(getCombinedFiltersForTable(505), "AND") }, 
     { tableId : 500, filter : combineFilters(getCombinedFiltersForTable(500), "AND") } 
]; 

{"command":"setFilters","filters": allTableFilters }