Attempting to use the API Identify operation with identifyParameters to identify on a map service. Goal is to have the results return to the popup with popup highlight graphic on the map. There are some bugs based on setting various identifyParameters not working as expected or sending lots of additional fetch requests (based on 4.25). The starting point was using the API Sample:
- Works: If set layerIds and returnGeometry false (don't set sublayers): Identify returns, popup shows and no highlight graphic [makes sense]
- Issue: If set layerIds and returnGeometry true (don't set sublayers): Identify returns (with geometry), popup shows but not highlight graphic [issue as should be able to see highlight graphic].
- seems like a separate issue where the PopUp doesn't show the highlight graphic properly. Can replicate issue by sending a feature with graphic to the popup and it will not show the highlight graphic.
- Issue: If set sublayers (with or without layerIds): Identify returns, popup with highlight graphic - Seems good at first but it sends 2 additional fetch requests, a query request and map export request. The identify return graphic will show for split second but is then replaced by the extra query response graphic. Extra query/export requests shouldn't be needed/called and adding lots of chatter.
- If many features in popup, scrolling to next feature will continually call the additional query and export requests each time as well.
- Issue: Setting maxAllowableOffset and sublayers: The maxAllowableOffset is honored in the identify response, but then replaced by the extra query response graphic (and query result graphic doesn't honor the maxAllowableOffset). Extra query/export requests shouldn't be needed/called (also does this for each 'Next feature' in popup too).
- Issue: Setting sublayers with returnGeometry false: Still always does the extra 2 fetch requests (query/map export) and shows the popup with a graphic. The Identify response honors the returnGeometry setting but is ignored for the additional query request.
Hoping I'm just missing something here, any thoughts on workarounds would be appreciated. I did attempt writing an esriRequest to the map service rest identify endpoint. Everything works except the showing of the graphic highlight in the popup (same as #2).