Once the query completes, you could figure out how many features fit each renderer category.
//Shell var shellQuery = new esri.tasks.Query(); var shQT = new esri.tasks.QueryTask(tweetsURL) shellQuery .geometry = myMap.extent shellQuery .returnGeometry = false; shellQuery .where = "brand = 'Shell" shQT .executeForCount(shellQuery , function(count){ dojo.byId("shellCount").innerHTML = count; },function(error){ console.log(error); }); //BP var bpQuery = new esri.tasks.Query(); var bpQT = new esri.tasks.QueryTask(tweetsURL) bpQuery .geometry = myMap.extent bpQuery .returnGeometry = false; bpQuery .where = "brand = 'BP'" bpQT.executeForCount(bpQuery , function(count){ dojo.byId("bpCount").innerHTML = count; },function(error){ console.log(error); });
function chart1() { var cq1_extent = map.extent; var c1QT = new esri.tasks.QueryTask(gdaURL); var cq1_platinum = new esri.tasks.Query(); cq1_platinum.where = "review = 'false' AND LEED_rating = 'Platinum'"; var cq1_gold = new esri.tasks.Query(); cq1_gold.where = "review = 'false' AND LEED_rating = 'Gold'"; var cq1_silver = new esri.tasks.Query(); cq1_silver.where = "review = 'false' AND LEED_rating = 'Silver'"; var cq1_certified = new esri.tasks.Query(); cq1_certified.where = "review = 'false' AND LEED_rating = 'Certified'"; cq1_platinum.geometry = cq1_extent; cq1_gold.geometry = cq1_extent; cq1_silver.geometry = cq1_extent; cq1_certified.geometry = cq1_extent; cPlatinum = c1QT.executeForCount(cq1_platinum); cGold = c1QT.executeForCount(cq1_gold); cSilver = c1QT.executeForCount(cq1_silver); cCertified = c1QT.executeForCount(cq1_certified); c1List = new dojo.DeferredList([cPlatinum, cGold, cSilver, cCertified]); c1List.then(buildChart1); } function buildChart1(results) { console.log(results[0] + " platinum records"); console.log(results[1] + " gold records"); console.log(results[2] + " silver records"); console.log(results[3] + " certified records"); }
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.