We have integrated ArcGIS with our React.js project, where we are using several Feature & Map Server layers to display data on the map. However, we are encountering a challenge with filtering the data at the state level.
The issue is that our layers contain a large amount of worldwide data, and the data properties do not include a "state" field. We need to dynamically filter and display data based on a selected state, but since we do not own the layer, we cannot modify or add properties directly to it.
We have implemented a solution using state geometry to filter the data, but this approach is causing it to first fetch all data from the API endpoint and then show it on the map. We want to show the data as it gets from the API and not wait for the whole data to download.
Reference endpoint:
https://services.arcgis.com/v01gqwM5QqNysAAi/arcgis/rest/services/Mineral_Resources_Data_System_MRDS_Compact_Version/FeatureServer/0