wmbeers / cmv-app

CMV - The Configurable Map Viewer - A community supported open source mapping framework built with the Esri JavaScript API and the Dojo Toolkit
https://demo.cmv.io/
MIT License
1 stars 2 forks source link

Unexpected behavior from Identify task for feature layers #30

Open wmbeers opened 4 years ago

wmbeers commented 4 years ago

How often can you reproduce it?

Always, when feature layers are loaded stand-alone, not as map services. If layers are loaded via a map service, the issue does not occur.

Description:

Jonathon Bennet called the help desk to report that when he clicked on areas with overlapping features, the identify results only show the topmost.

Steps to reproduce:

  1. Load feature layers into the map that have overlapping features, e.g. Mitigation Banks, RIBITS Mitigation Banks by USACE, and Mitigation Bank Service Areas.
  2. Click on an area that has features in all layers, e.g. FOX BRANCH RANCH MB in the RIBITS layer, which overlaps features in the other layers

image

Expected results:

Identify window with arrows for multiple results:

image

Actual results:

See first screenshot above, only the topmost layer results are shown

wmbeers commented 4 years ago

Clarification: I can reproduce this with a single feature layer that has overlapping polygons (such as the mitigation banks, or SHPO survey areas--see midtown Tallahassee near Pine and Shell streets. If the layer is loaded as a standalone feature layer, the graphic property of the evt object passed to executeIdentifyTask is set to whatever happens to be the topmost graphic. The executeIdentifyTask shortcuts doing an identify to the underlying layer, and pushes the graphic into the results for that layer. Other graphics under the topmost graphic are not included. Other layers are processed normally.

It's possible, then, that desired behavior could result if we comment out the block beginning with if (!this.checkForGraphicInfoTemplate(evt)) {....

wmbeers commented 4 years ago

It's possible, then, that desired behavior could result if we comment out the block beginning with

Nope. Doesn't return anything at all for feature layers if the block doesn't run. Next approach idea is to ignore features, but then modify the loop through visible layers, which seems to be filtering out feature-layers.

wmbeers commented 3 years ago

Note: this is a duplicate of a CMV bug tracked here: https://github.com/cmv/cmv-app/issues/930