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]); }
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.