var livingAtlasLayer2 = new FeatureLayer({
url: "https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/USGS_Seismic_Data_v1/FeatureServer/query?outFields=*&where=Hours_Old%20%3C%20100"
});
So I am trying to run queries when creating a feature layer. So far, it just seems to ignore the query altogether and run the layer as normal. Is there a way to make this work using this method? I know normal api calls, this can work, depending on the source.
My intent here is to control the data so that I only get the most recent data to show up.
Solved! Go to Solution.
What is the intent? To filter the data being displayed on the map, or to query and retrieve a subset of the data that match your query parameters?
Filter data displayed on the Map
FeatureLayer.definitionExpression
Rretrieve a subset of the data that match your query parameters
FeatureLayer.queryFeatures(...)
What is the intent? To filter the data being displayed on the map, or to query and retrieve a subset of the data that match your query parameters?
Filter data displayed on the Map
FeatureLayer.definitionExpression
Rretrieve a subset of the data that match your query parameters
FeatureLayer.queryFeatures(...)
To make a window of the data that is closer to the present, so the data showing is only the more recent data (in this case, only the more recent earthquakes). That's my intent. Whatever accomplishes that intent, that makes it work with the map I've put together using ArcGIS, I am down for. I guess I should have also mentioned, I am using version 4.22
Thank you so much for pointing the way. I am still very new to making all of this work, so this is so very appreciated!