AnsweredAssumed Answered

Can a layer URL be swapped?

Question asked by tligon on May 8, 2013
Latest reply on May 13, 2013 by tligon
In my app I have 3 layers; each layer has an array with 2-3 endpoint URLs associated with it. When the app first loads and I create the layers, I pull the first URL from the layer's associated array, apply display levels, and add the layer to the map.

I have an "onError" function that determines which layer failed, pulls the next URL from the layer's URL array, and assigns that URL to the layer. Problem: it seems that the URL can't be switched. Do I have to remove the layer from the map, re-create the layer with the next URL, and add the layer back to the map?