Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

How to expand the tree item of the last item added to MapSwitcher?

$
0
0
I want the last map service name added to the TOC MapSwitcherWidget to expand after the map/layer is added.

I can get all of them to expand using this
this.toc.expandLayerItems();


But I have tried all kinds of code to get that last item added to open but nothing works. It seems like one of these should work but it does not.
toc.expandChildrenOf(toc.firstVisibleItem,true);
toc.expandItem(toc.firstVisibleItem,true);

Forgot to add tried this also
this.toc.openItems.push(toc.firstVisibleItem);


Any ideas?

Thanks.

Viewing all articles
Browse latest Browse all 2097

Trending Articles