Hi Heming,Please find attached my code in a zip format. It contains three files, *.html, *.css and *.js. The application allows user to select a State in India and then one indicator. Selecting one indicator should render the map and add the graphics. Selecting another variable for the same State should add new rendered graphic and remove the previous one. Thanks for your help.Samir
Hi Heming,I tested your code to and made some minor changes based on my flow, but the graphics still do not show up. Can I email you my entire code for you to look at? Would you have time to resolve this issue for me? I have spent a lot of time trying to solve this problem.ThanksSamir
Hi Heming,Thanks for your response. I am attaching the entire code for this function which'll give you a complete picture. I understand your point about the code creating new graphics layer each time. That might be the reason that each time I change my indicator, the new graphics layer shows on top of the previous one. I'll appreciate it if you can look at this code and suggest a solution.ThanksSamir
Thanks for your help Derek,It seems like a very simple issue but I am not being able to resolve it. The code below has a problem and I cannot figure it out. Can you please help me iron this out?function showQueryResults(queryTask1, query1, Indicator){ dojo.connect(queryTask1, "onComplete", function(featureSet) { distGraphicsLayer = new esri.layers.GraphicsLayer(); for (var i=0, il=featureSet.features.length; i<il; i++) { var graphic = featureSet.features; graphic.setInfoTemplate(infoTemplate); distGraphicsLayer.add(graphic); } //for map.addLayer(distGraphicsLayer); distGraphicsLayer.setRenderer(renderer); for (j=0; j<distIndicators.length; j++){ if (distIndicators==Indicator){ distGraphicsLayer.show(); } else { distGraphicsLayer.hide(); } }ThanksSamir
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.