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]); }
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.