1. 同時(shí)加載多個(gè)layer時(shí), cql_filter 出錯(cuò)
Layers and filters are mismatched, you need to provide one filter for each layer
解決方法: 官方文檔
多個(gè)layers同時(shí)加載時(shí),filter需要分別設(shè)置,以 ; (分號(hào))隔開(kāi)
2. 使用cql_filter 要urlEncode編碼
like
&cql_filter=dkbm like 'xxx%' 這樣寫(xiě)不行,下面的寫(xiě)法才對(duì)
&cql_filter=dkbm%20like%20%27xxxx%25%27
in
&cql_filter=task_id in ('22', '23')
&cql_filter=task_id%20in%20(%2722%27,%20%2723%27)
多個(gè)條件時(shí),用and連接
&cql_filter=town_code in ('22', '23') and user_id = xxx
&cql_filter=town_code+in+(%2722%27%2c%2723%27)+and+user_id+%3d+1102