Solved! Go to Solution.
// hide other layers dojo.forEach(map.layerIds, function(id) { map.getLayer(id).hide(); });
// hide all feature layers dojo.forEach(map.graphicsLayerIds, function(id) { var layer = map.getLayer(id); if (layer.declaredClass === "esri.layers.FeatureLayer") { layer.hide(); } });
// hide other layers dojo.forEach(map.layerIds, function(id) { map.getLayer(id).hide(); });
// hide all feature layers dojo.forEach(map.graphicsLayerIds, function(id) { var layer = map.getLayer(id); if (layer.declaredClass === "esri.layers.FeatureLayer") { layer.hide(); } });