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
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
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.