Solved! Go to Solution.
View solution in original post
dynamicLayer.visibleLayers = new ArrayCollection([0, 1]);