Table of Contents - Legend Widget for FlexViewer 2.x

116434
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
RhettZufelt
MVP Notable Contributor
Jeff,

Hard to test as your crossdomain is blocking me.

However, curious if you still have the issues if you set the mapswitcherwidget.xml layerlist tag to false?  <layerlist visible="false"> since the TOC widget is not designed to run with it set to true?

R_

Guess it is only blocking the gis1:6080 stuff.
0 Kudos
JeffLegato
Occasional Contributor
Jeff,
However, curious if you still have the issues if you set the mapswitcherwidget.xml layerlist tag to false?  <layerlist visible="false"> since the TOC widget is not designed to run with it set to true?


That did it!! 

Thanks a million!  I'll be sure to disable that in my apps!

Jeff
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   Rhett is spot on. The readme.txt warns:
It is your responsibility to disable the layerlist portion of the MapSwitcherWidget or eMapSwitcherWidget by setting the
<layerlist visible="false">
Also ensure you do not use the TOCWidget with the LayerListWidget.
0 Kudos
BradChampagne
New Contributor
I have a map service with several group layers, one group has 3 layers (2 polygon, 1 raster) and the polygon layers have labels.  When I turn the group checkbox off/on in the TOC widget, all layers turn off/on including labels as expected.  Problem occurs when I add both polygon layers to the <excludelayers> section in TOCWidget.xml.  When I turn the group layer off (it's on by default), the features and labels disappear from the map (so far so good), but when I turn the group layer back on, the features appear but no labels.  Turning the group layer on/off has no affect on making the labels reappear.  Am using Flex Viewer 3.3 and ArcGIS Server 10.1.

Brad
0 Kudos
RhettZufelt
MVP Notable Contributor
Brad,

The TOC widget lets you exlude layer(s) by layer label in the config.xml.  If you add the label of a layer to the exlude section of the TOC, you should not see that service in the TOC to be able to turn on/off in the first place.

It sounds like you are trying to exclude a sub-layer from the TOC.  I don't see anywhere that says that is possible, unless the sub-layer was loaded separatly so that it had it's own <layer> tag in the config.xml file.

R_
0 Kudos
BradChampagne
New Contributor
Rhett,

Yes, they are sub-layers that I'm excluding, and the TOC-Legend widget allows that using this type of code in TOCWidget.xml:

<excludelayers>
    <excludelayer mapservice="ACLMV2">32</excludelayer> <!-- Township label -->
    <excludelayer mapservice="ACLMV2">33</excludelayer> <!-- Section label -->
</excludelayers>

32 and 33 are the index values for the layers in the ACLMV2 map service.  I want to hide those layers from the Map Contents list, but I want the layers to behave normally when their group layer is turned on and off.  The features behave normally, but unfortunately the labels do not.

Brad
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Brad,

   I am dealing with a lot of 3.4 upgrade stuff right now and normal work so I will have to take a look at this when time allows. Obviously it should not be doing what it is doing with the labels not coming back on. 😞
0 Kudos
RhettZufelt
MVP Notable Contributor
Brad, you are correct, it seems I was a little confused..... or something.....

Anyway, I'd have to defer to Robert's post above.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   I guess the pdf does not explain this ability but it is listed in the ReadMe.txt
Version 2.3.5 - 7 June, 2011
* Whole map services AND/OR INDIVIDUAL layers can be excluded from the TOC.
0 Kudos
RhettZufelt
MVP Notable Contributor
I see that now.  Just had a momentary BF today.

R_
0 Kudos