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"); }
//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); });
Once the query completes, you could figure out how many features fit each renderer category.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.