Select to view content in your preferred language

Using where clause in ClusterFeatureLayer

1403
0
12-26-2016 03:05 AM
PavleJovanov1
New Contributor

I am using the ClusterFeatureLayer (cluster-layer-js) and I am trying to use where clause. It works fine when I use it in initial request something like this:

clusterLayer = new ClusterFeatureLayer({        "url": featureServiceCoinFindings,        "distance": 95,        "id": "clusters",        "labelColor": "#fff",        "resolution": map.extent.getWidth() / map.width,        "singleTemplate": false,        "disablePopup": true,        "singleSymbol": defaultSym,        "useDefaultSymbol": false,        "zoomOnClick": true,        "showSingles": true,        "objectIdField": "OID",        "where": "ID < 50",        outFields: ["*"]    });

But I want initially to load all features and then on button search to filter some of them. When I do something like this clusterLayer.where = "ID < 50"; on button click, the clusterLayer doesn't refresh and I still have all features shown in clusters on the map.

0 Kudos
0 Replies