Select to view content in your preferred language

Group basemaps

1476
3
09-28-2010 10:45 AM
AlexJones
Emerging Contributor
Using the Flex Viewer 2.1 is it possible, in the default application, to group Basemap layers. For example, if multiple Imagery sources wanted to be used. Before I add this functionality I wanted to know if it is already built in. I don't believe so at first glance of the Map Switcher widget and the config examples. As always help is appreciated.
Tags (2)
0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
Correct, this is not currently supported.
0 Kudos
AlexJones
Emerging Contributor
Thanks Dasa,

I have started looking in to this but I am having a little bit of trouble with two things. Maybe you or somebody else can help out. I have changed the loop that generates the mapList arraycollection of basemaps. I now have essentially two arraycollections. mapList for the tbb control and dopDownMapList for the new TOC control. I can now say which basemaps show in the tbb as well as which basemaps show up in the new dropdown toc component. My dropTOC is basically a copy of the original in the mapSwitcher widget. I am just looking for a bit of help on the following:

1. Switching the basemap to the selected item in the dropTOC control. How do I say " If item selected change basemap to selected.
2. The second part to this is how can I set the tbb control to -1, to turn off the other basemap.

I am just not sure if I add a new click handler for my dropTOC or if I access it directly. The original has. TOC.map, TOC.exclude, etc. Can I say dropTOC.selectedIndex = x?

I attached a screenshot showing my new button with my dropTOC.
0 Kudos
AlexJones
Emerging Contributor
I have determined part of my problem. I was using one array collection as a data provider which was not necessary as I can use dropToc.exculde layer. this allows me to switch the basemaps without any problems. I still have two issues.

1. Where is the proper place to deselect the tbb control. (New function?)

2. When using the exclude layer is it simply looking for an array collection? I tried using an array collection, but this did not work. Currently I have hardcoded and Array which does work. Are there any caveats to using the built in include/exclude?

Again, help is greatly appreciated.
0 Kudos