I am using IdentifyTask() on a feature layer to show popups of feature points when the map is clicked. However, I need to be able to display popups for only those feature points which have a certain attribute value (eg. popups for those with the attribute {status:"Active"} should be displayed, but for those with {status:"Inactive"} should not be displayed). I could not find any properties in IdentifyParameters() which would allow me to do that. The current workaround I am using is filtering for the attributes from the returned results. But I am wondering if there is a way to specify the filter parameters within IdentifyParameters(). What I am looking is something like the where property in Query().
Solved! Go to Solution.
Vishwas,
The 4.x api does not have a layerDefinitions property like the 3.x api had:
https://developers.arcgis.com/javascript/3/jsapi/identifyparameters-amd.html#layerdefinitions
So for now filtering the results like you are is the best solution.
Vishwas,
The 4.x api does not have a layerDefinitions property like the 3.x api had:
https://developers.arcgis.com/javascript/3/jsapi/identifyparameters-amd.html#layerdefinitions
So for now filtering the results like you are is the best solution.
Robert,
Thanks for the response. Can't we use requestOptions constructor of IdentifyTask()? The requestOptions object has a query property, but there are no samples which demonstrate it being used. I might have misunderstood the functionality of requestOptions. TIA
Vishwas,
No requestOptions property is for something else completely and is documented in this link:
https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions
Are there any plans to add the layerDefinitions property to Identify Parameters in the future for v4?