I have a dynamicMapServiceLayer that I am using to build a map application. There are about 10 layers in the mapservice that I am toggling using the setVisibleLayers action.
I would like to build my own custom, dynamic map legend. When a layers' visiblity is toggled, the corresponding legend item would also hide() / show()
My mapServer has a url that links to a page with all the corresponding legend items like below except my legend's url has 10 legend items
Is there a way I can access the individual legend items (Name and symbol) from a existing mapServer? I am comfortable building the legend, I just need to know how to access the layers' symbols which I will then append to a legend dialog.
I should also mention that I am avoiding using DOJO and using pure javascript and jQuery.