Dear all, good day to all of you. Please help me in following coding. I want to view the legend which layers are visible through in click event or active in the map scale. I tried several ways but could not make it run. I have another problem with getting feature information. From the present coding i am getting the on click event feature information from a feature layer but I want it from the active top-most layer. Now when I switch off all layer even though the feature information is coming. Please see the screen shorts.