I am using ArcGIS API for Javascript in a Nuxt application and I would like to find the max and min values of a field in a feature layer hosted on ArcGIS. How to do that ?? The values for the stops for the visualVariables are hard coded and I would like them to be dynamic and take the min and max values of the field.
You can use StatisticDefinition with the query.outStatistics to get the min/max values.
https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-StatisticDefinition.html
You can search for "statistics" in the Sample Code page and find a number of samples including this one.
https://developers.arcgis.com/javascript/latest/sample-code/popup-customcontent/
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.