Thanks R_. I do not think they (the ups) are going to want to use his widget so I have to recreate just that part.
I am surprised this was not build in from the beginning. It is confusing that the <layer> tag is used for a map service. Roberts is so much easier to understand (I have this map service and I want these layers from it).
We will also be bringing in layers from other organizations and we may want to have one of the layers from their map service listed in one spot and another somewhere else.
I keep going to exclude layers like you say but i would really like to have a blank map and then load in layers as I go (since there will be 1,000+ layers over many map services - some in house, some not). Just like how ArcMap works, you start with a blank TOC and then add in layers using a Add Data button - you think esri would have made them similar. But when i drill down in the code to where a layer is actually added I eventually hit a spot where the source code is no longer supplied. I have another feature that lets a user save the list of layers they picked out so that say the next day they can reload and keep working or send it to someone else (a save map). I have it working with using exclude but the file is weird to look at since it actually lists the opposite of what they had.
I am trying to build the biggest web map ever but the code assumes just a little simple one is the issue I think.
I will go through Roberts code a 5th time and see if I can find it.
Thanks again.