Hi ReneRubalcava,
That was very helpful.
This is what my parameters look like. However, it still identifies features that are hidden because of the definition expression on the MapImageLayer. At quick glance, can you tell why the definition expression doesn't appear to be working for identify? I'm using version 4.13.
// Create identify task for the specified map service
identifyTask = new IdentifyTask(urlTravelImpacts);
// Set the geometry to the location of the view click
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.layerIds = [indexBridgeRestriction, indexRoadImpact, indexRestrictionCurrent, indexRestrictionFuture, indexReferencePoints, indexIntersectionNode, indexMilepostsEstablished, indexMaintDistrict];
identifyParams.layerOption = "visible";
identifyParams.width = view.width;
identifyParams.height = view.height;
identifyParams.returnGeometry = true;
identifyParams.sublayers = [
{
id: indexBridgeRestriction
},
{
id: indexRoadImpact,
definitionExpression: "TravelImpactStartDate <= '2022/09/07' AND TravelImpactEndDate >= '2022/09/07'"
},
{
id: indexRestrictionCurrent,
definitionExpression: "TravelImpactStartDate <= '2022/09/07' AND TravelImpactEndDate >= '2022/09/07'"
},
{
id: indexRestrictionFuture,
definitionExpression: "TravelImpactStartDate <= '2022/09/07' AND TravelImpactEndDate >= '2022/09/07'"
},
{
id: indexReferencePoints
},
{
id: indexIntersectionNode
},
{
id: indexMilepostsEstablished
},
{
id: indexMaintDistrict
}
];