jtallman

Help Creating ArcGISImageServiceLayer Toggle Button

Discussion created by jtallman on Jan 13, 2014
So I've managed to copy, paste, and hack my way through creating a JavaScript application utilizing this forum and the API help. My app utilizes the ESRI Gray basemap, a cached map service from our server, and a dynamic map service from our server. I have also added in the geolocator widget, measurement widget and the navigation toolbar widget.

For my next feat, I'd like to create a toggle button. I'd like the button to toggle an ArcGISImageServiceLayer and a new ArcGISTiledMapServiceLayer "off" and "on." At the same time, the button would turn the existing ArcGISTiledMapServiceLayer "off." I'd also like this button to only be active at a set LODS (so if you are zoomed all the way out, you cannot toggle the ArcGISImageServiceLayer and cached map service "on"). Is there anybody that can help me with the code for this?

This link: http://forums.arcgis.com/threads/76857-Help-adding-Print-button-to-toolbar is kind of what I'd like to do with the toggle button by placing next to the navToolbar buttons...obviously the code behind the toggle button would vary...

Thanks!
Josh

Outcomes