Hi everyone,I'm trying to to create a dynamic identify. The idea is to emulate as close as possible the identify experience from ArcGis desktop.So far I've been able to connect to the map to obtain the active services, then cycle trough them to know the witch layers are visible, and now I'm in the process of figuring out how to access the attributes (name and value). Is it possible to access this information, without knowing in advance witch fields are going to be returned? I know that the information is under the result.feature.attributes.*, but can you help me in cycling trough this information? This has to be a really generic function so that it works with any layer without prior coding or configuration.Thanks.
for (var attribute in results.feature.attributes) { if(attribute.toString().toUpperCase() != "SHAPE") { console.log(attribute + " - " + results.feature.attributes[attribute]); } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.