We have sign supports and street sign layers. Sometimes the layers will be stacked and the elements will be too. What do I need to do to navigate through the layers and the elements of the layer that are located at the exact same location?
Here is what I have to evaluate an individual element from the street supports layer:
var supportId, type, address; app.supportLayer.on("click", function (evt) { supportId = evt.graphic.attributes.SUPPORTID; type = evt.graphic.attributes.TYPE; address = evt.graphic.attributes.ADDRESS; app.attributesModal.modal("show"); document.getElementById("address").value = address; console.log(supportId); console.log(type); console.log(address); });
Here is an editor widget that does the same thing. I had to make a larger form for mobile devices:
Would an identify task work for you?
Identify features on a map | ArcGIS API for JavaScript
There is a parameter "layerOption" that you can specify (LAYER_OPTION_ALL, LAYER_OPTION_TOP, LAYER_OPTION_VISIBLE)
IdentifyParameters | API Reference | ArcGIS API for JavaScript
If you need to do the same with graphics, there's a method to do this, too!
Find graphics under a mouse click with the ArcGIS API for JavaScript | ArcGIS Blog
I've had something like that for another app, but I need to populate a form for field use and data entry on a mobile device.
I use another type of popup when there are many features at the same point in this application. I'm returning all the features for the visible layers found in an IdentifyTask and put them into a dGrid. The features are grouped by layer on separate tabs.
I could possibly hide the grid and then get the value of the element of the grid. It looks some identifies place multiple rows as the identified location. Still need to navigate between layers or in that case tabs. Are you able to get values from an individual cell?