I am using identify onclick. I am able to get the attributes only with their specific names likeidResult.feature.attributes['FACIL_ID']I want to retrieve all the fields and values from the attribute table of the layer. ThanksQazi Iqbal
var fields =[]; var fieldName; for (attribute in idResult.feature.attributes) { fields.push(attribute); } for(var i=0; i<fields.length; i++) { fieldName =fields; // field name alert(fieldName); // field value alert(idResult.feature.attributes[fieldName]); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.