AnsweredAssumed Answered

Obtain Layer Type from list of layers

Question asked by krobine on Dec 7, 2012
In the following example, after I get the layer, how can I tell what layer type it is?  Ie Tiled or Dynamic, or Feature? I know I can read it from what I startup the map with, but there must be another way..

Seems like an easy question, but I couldnt find it.. Thanks.

function getLayerProperties() {
  for(var j = 0; j < map.layerIds.length; j++) {
    var layer = map.getLayer(map.layerIds[j]);
    alert( + ' ' + layer.opacity + ' ' + layer.visible);