tags please! //combo box item function populateList(results) { //Populate the dropdown list box with unique values //alert("sss: "+results.length); var zone; var values = []; var testVals={}; //Add option to display all zoning types to the dropdown list //values.push({name:"ALL"}) var features = results.features; //values.push({name:'ALL'}); dojo.forEach (features, function(feature) { zone = feature.attributes.TOPIC; if (!testVals[zone]) { testVals[zone] = true; values.push({name:zone}); } }); var dataItems = { identifier: 'name', label: 'name', items: values }; var store = new dojo.data.ItemFileReadStore({data:dataItems}); dijit.byId("mySelect").store = store; values.push({name:"ALL"}) }
//combo box item function populateList(results) { //Populate the dropdown list box with unique values //alert("sss: "+results.length); var zone; var values = []; var testVals={}; //Add option to display all zoning types to the dropdown list //values.push({name:"ALL"}) var features = results.features; //values.push({name:'ALL'}); dojo.forEach (features, function(feature) { zone = feature.attributes.TOPIC; if (!testVals[zone]) { testVals[zone] = true; values.push({name:zone}); } }); var dataItems = { identifier: 'name', label: 'name', items: values }; var store = new dojo.data.ItemFileReadStore({data:dataItems}); dijit.byId("mySelect").store = store; values.push({name:"ALL"}) }
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.