I am newbie to ArcGIS Maps SDK for Javascript.
I have done a filter by attributes (from user selection) on client-side. It works right, but I would like to show a message if the filter doesn't return any item. Is it possible with any method with my approach or should I change it?
Here is my code : https://codepen.io/gisdevelopment/pen/OJozLzw
Solved! Go to Solution.
Hi there,
You will have to query the features on the layer view once you change the layer view's feature filter. You can do it as shown below:
// Get a query object from the filter's current configuration
const queryParams = earthquakesLayerView.filter.createQuery();
earthquakesLayerView.queryFeatures(queryParams)
.then(function(results){
console.log("results", results.features);
});
Hi there,
You will have to query the features on the layer view once you change the layer view's feature filter. You can do it as shown below:
// Get a query object from the filter's current configuration
const queryParams = earthquakesLayerView.filter.createQuery();
earthquakesLayerView.queryFeatures(queryParams)
.then(function(results){
console.log("results", results.features);
});
Thank you very much