Thursday, February 28, 2008 11:25 AM -
Code-Challenge-Team
TOC Context Menu Example with Common GIS Tasks
By Dave Butz, GIS Sofware Developer, Riverside, California, USA
Download the script.
Code Summary
This is a demonstration of implementing a right click context menu for the TOC control which allows a user to right click on a layer and select an option to perform on that layer. In my example, I have coded three common GIS options in the context menu; Move Layer Up, Move Layer Down, and Export Layer Attributes.
So a user can right click on any layer and move it up or down in the TOC thus changing its rendering order in the map display, or they can export its attribute table to a .csv file. They will see a link appear in the Task Results window that they can click on and download the resulting file.