How to know type of a layer?

Discussion created by pkroy2k4 on Sep 12, 2013
Latest reply on Sep 12, 2013 by ZachLiu
Hi All,

Using java script API I need to iterate through the layers of map and depending on the type of layer, need to perform certain actions.
Can anyone tell me how to know the type of layer, whether it is a tiled, dynamic, WMS  etc.

Thaks in advance
Pankaj Roy