I've got a requirement to add a feature layer to a map by being given the name of the layer. All layers will reside on the same feature server. Is there any way to go through all of the layers on a feature server to find the one with the correct name, create this as a FeatureLayer and add this to the map?
The only other alternative for me right now (that I can think of) is to have the layer number and name defined in my config.xml and use this as a lookup when I need it. Ideally I'd just have the server URL and be able to get the layer by name somehow.
I hope my explanation isn't too gibberish