Tuesday, March 29, 2011

Another Enhanced TOC/Legend Widget

I don't like an idea of separating TOC and legend. Maybe I am an old-fashion guy, but I like to have a widget where I could see icons and names, turn on/off layers, tell whether or not a layer is in its display scale range. And it has to handle sublayers because I have a lot of layers with subtypes. It would be cool if I could click a layer and see the layer properties. It doesn't have to show all of them, but just some major pieces. You know, something like the TOC in ArcMap.
And some of my friends are still using 9.3.1 and others have gone to 10. The widget should work for all of them, although I wouldn't mind telling them that it runs faster and more smoothly with 10.
If you were like me, take a look at this widget (http://www.arcgis.com/home/item.html?id=cd57c351fb9a4167853c04ec9380c8b1). You may like it. It's a beta version developed on FlexViewer 2.2.

Revision: 3-27-2011
1. added labels into config.xml
2. added displayMode into config.xml for a collapsed or expanded mode (thanks ryonwithano for the great suggestion)
3. added buttons to expand or collapse all layers
4. added search layer by keyword
5. set a hand cursor for clickable images

Revision: 3-29-2011
1. improved the error handling
2. added the support for a tiled map service
3. fixed the layers ordering bug (thanks webmapper123 for reporting the bug)

Let me know what you think.



At May 19, 2011 at 1:17 AM , Blogger Dilip Wagh said...

I do like the functionality as it does everything I need and more, can you post the un-compiled code so I can add it into my flex project, it would be a great help in also understanding how it all works, your help is greatly appreciated, and thanks in advance.

At May 19, 2011 at 1:22 AM , Blogger Dilip Wagh said...

I have just seen the post where you say you are not releasing the code, my apologies for asking, I am not using the Flex Viewer, and wanted to put the code into a bespoke viewer I am developing, will that work, and what do I need to do to make it so. Again any help would be appreciated.


Post a Comment

Subscribe to Post Comments [Atom]

<< Home