Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

122781
664
12-01-2010 07:30 AM
RobertScheitlin__GISP
MVP Emeritus
All,

Here is the next in my line of widgets for the FlexViewer 2.x.

The legend portion of this widget is the same code as my dynamic legend widget so,

IT IS FOR ARCGIS SERVER 10 OR GREATER ONLY

This is just a simple TOC Widget that includes my dynamic legend component.
This widget also includes my enhancement for map service transparency,
right click context menu for zoom to make layer visible, and my scale
dependent renderer for the TOC checkboxes.
Tags (2)
0 Kudos
664 Replies
RobertScheitlin__GISP
MVP Emeritus
Alexander,

   Your out of luck there. I don't keep older versions of the source code only the compiled code.
0 Kudos
MattGiles
Deactivated User
Hi Robert,
I am currently using your "Table of Contents/Legend Widget Version 2.5 - For Flex Viewer 2.5". I am fairly new to flex, but was wondering if there is any way to make the widget grow dynamically as layers are added (like your dynamic legend widget)? Also, is there any way to remove the option to close the widget (and keep the option to minimize), as I do not want an icon for this widget on my toolbar.
Cheers,
Matt Giles
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Matt,

  
there is any way to make the widget grow dynamically as layers are added
No, if you are talking about the widget container itself.

is there any way to remove the option to close the widget
Not without change the code or using a custom widgetTemplateSkin
0 Kudos
BarbRosenbaum
Emerging Contributor
Hi Robert -

Your TOC contribution is great - in particular the integrated legend!

I'm wondering if you can think of a way to add a group heading to a set of services I might add to your TOC? I have several sets of services I'd like to group under headings in a tree structure. For example:

Map Contents
   group heading 1
     service x
       layer 1
       layer 2
     service y
     service z
   group heading 2
     service p
     service q
       layer 1
       layer 2

I know it's possible to do this with groups/headings in a MXD, but these are individual services and I don't want to cascade services. And I know this will confound the service/layer "move up and down" - but if I only needed to move the services within a group instead of moving groups?

Thanks,

Barb Rosenbaum
Innovate! Inc.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Barb,

   No, many have asked about this before and it would just completely convelute the whole TOC code and be a nightmare to manage.
0 Kudos
MattiasEkström
Frequent Contributor
Barb, and others who would like use groups/headings,

I want this functionality as well, and there is a way to do this without adding the functionality to the actual TOC-component. What I've done is that I've rewritten the widget to use several TOC-components, one for each group, and each TOC-components only include the layers belonging to that code. In the config-file I specify my different groups and which layers that belongs to them and then in the code I create an Accordion in my case with the different TOC-components.
See the attached image to get an idea of what it might look like, (I've also moved everything to the MapSwitcher and the operational layers box).
One big disadvantage is that I have to specify my layers twice, once in the main config file and once in the TOC-widget/MapSwither config file with the exact same name where I also specify the groups. 

Unfortunately I won't be able to share my code as it is because I've made a lot of my own customizations and haven't been careful enough to comment all of my changes.
But the principle of using one TOC-compontent including only some specified layers for each group is a way to achieve groups/headings without to much coding.
0 Kudos
BarbRosenbaum
Emerging Contributor
Robert and Matt -

Thanks to both of you for your quick responses. Matt - your suggestion should work for me - I think that is a great work-around.

Barb Rosenbaum
Innovate! Inc.
0 Kudos
BarbRosenbaum
Emerging Contributor
Apologies Mattias - I abbreviated your name. Barb
0 Kudos
MattGiles
Deactivated User
I think my question may be the same / similar to Barbs above:

I have two wms layers from atlas of canada: protected areas and protected area labels.

I was wondering if theres any way to nest the two layers inside the TOC?
ex: Protected areas
            Protected Areas
            Labels

This is done in the example for Recreation
                                              - Trails
                                              - Facilities
                                              - Recreational Areas
0 Kudos
BoCastillo
Deactivated User
Robert,

First, thanks for the great widget and the hard work you have given the Flex community.

Is it possible to only expand the "top layer"? The problem is with using "extended=true" is that it expands lengthy layers such as "soils' and some layers don't expand at all. This is what I get by default in the first screenshot. What I would like to see is in the second screenshot.

Thanks,
Bo
0 Kudos