Layers type

Add support for esri dynamic service in legend.  Add layers type to legend and layers items. Add functionality's to legend.