Select to view content in your preferred language

GraphicsLayer issues

3005
13
09-23-2011 12:03 PM
SamirGambhir
Frequent Contributor
Hello,
I am developing an application using ArcGIS Server 10 with JavaScript API. I am running into some issues with displaying GraphicsLayer on the map. I am trying to add a GraphicsLayer based on a query to an existing layer. The query adds the GraphicsLayer on the map and renders it based on the renderer assigned. Once displayed, clicking a features open up an infoWindow to display the query results. I have the following three issues:
1. Once I select the indicator, the layer should show up. But in my case it shows up only when I zoom in or out of the current extent.
2. Option "None" does not remove the layer from the map
3. Option "All" does not show up all the three indicators.
My code is attached as a text file. I'll really appreciate it if somebody can help.
Thanks
Samir
0 Kudos
13 Replies
SamirGambhir
Frequent Contributor
Sure, I can do that. let me clean it up a bit. I'll sned it to you soon.
Thanks
Samir
0 Kudos
SamirGambhir
Frequent Contributor
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
0 Kudos
HemingZhu
Frequent Contributor
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


I could not access your map services. So what i modified may or may not work. You will have to debug yourself
0 Kudos
SamirGambhir
Frequent Contributor
Hi Heming,
Thanks a lot for your help. The code worked really well. I had to make a minor change based on my flow.
Thanks again,
Samir
0 Kudos