Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

122390
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
DerekHunter1
Deactivated User
Should tiled operational layer's symbology not be visible in the TOC widget?  I apologize in advanced if my reading of the entire thread missed the answer.
0 Kudos
DerekHunter1
Deactivated User
I am trying to use the TOC with an tiled operational layer.  Is this possible?

It functions, but not symbology is displayed in the TOC.  I turned off the layervisibility in the map switcher and theviewer is not behind a firewall.
0 Kudos
RolandChu
Emerging Contributor
Hi Robert,

First of all I want to say thank you. This widget is amazing compared with the stock TOC.

I have a question about the TOC setting. I want everything in the TOC including legends is collapsed by default.

i.e. if a user wants to see the legends he/she has to check the expand box next to the layer name.

However, no matter I set

 <tocsettings>
  <expanded>false</expanded>
  <collapselegends>true</collapselegends>
 </tocsettings>


or

 <tocsettings>
  <expanded>false</expanded>
  <collapselegends>false</collapselegends>
 </tocsettings>


Every group layers and sub-layers is collapsed but the legends. All legends are expanded.

How can I change the settings so that everything is collapsed by default? Thank you.

Roland
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Roland,

     There seems to be a bug concerning this in the latest release. I will have it fixed in the next release. If you are use the source code than you can fix it by adding this line in the TocMapLayerItem.as in the createTocLayer function.

        private static function createTocLayer(parentItem:TocItem, layerInfo:LayerInfo, layerInfos:Array, visibleLayers:Array, tlayer:Layer, excludeLayers:ArrayCollection, iscollapsed:Boolean, isdisableZoomTo:Boolean):TocLayerInfoItem
        {
            const item:TocLayerInfoItem = new TocLayerInfoItem(parentItem, layerInfo, visibleLayers);
            item.scroller = parentItem.scroller;
            item.tocMinWidth = parentItem.tocMinWidth;
            item.disableZoomTo = isdisableZoomTo;
            item.collapsed = iscollapsed;
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
I am trying to use the TOC with an tiled operational layer.  Is this possible?

It functions, but not symbology is displayed in the TOC.  I turned off the layervisibility in the map switcher and theviewer is not behind a firewall.


Derek,

   As long as you are using ArcGIS 10 or greater it is suppose to work.
0 Kudos
VanessaGenovese
Emerging Contributor
Hi Robert,

I am using the latest version of your TOC tool for 3.0 and I am having a few problems with the drop down menu inside of it. I have tried the compiled version and the App Viewer 3.0 version. I'm not sure if it is something I am doing wrong?
Here are the issues I am having:
1) the "zoom to" and "description" menu items do not appear
2) the drop down menu is only available for the parent groups, not the child layers
3) when the top parent group is expanded, all of the drop down menus disappear for all groups

Also, since I have mostly raster images with stretched data values, is there anyway to "fix" the stretched legend symbol so it does not split the it in the middle? The legends are continuous in ArcMap but then when I publish the maps they come out this way in the viewer. This is not a problem with your tool but with the map service because I also saw this behavior with the ESRI layerlist tool. I have looked on the forums and have not been able to find a fix.
I would also prefer to remove the raster symbol at the bottom of the stretched legend since it is not needed but not a big deal if I can't.

Here is a link to my viewer which is publicly available so you can see some of the behaviors yourself if you want:
http://cquest.arc.nasa.gov:8399/flexviewers/global_cquest/

Thanks in advance for your help and for the cool tools!
0 Kudos
VanessaGenovese
Emerging Contributor
Robert,

No need to answer issue #1 from my previous post. I just realized that those items are false by default in the xml. I apologize for my ignorance. But the other issues still stand.
And one more question...can you change the behavior of the "expand/collapse all" to only to apply to the subgroups, not the entire dataset/layer list? Also, "select/deselect all" for subgroup visability would be a nice feature too.

Thanks again,
Vanessa

Hi Robert,

I am using the latest version of your TOC tool for 3.0 and I am having a few problems with the drop down menu inside of it. I have tried the compiled version and the App Viewer 3.0 version. I'm not sure if it is something I am doing wrong?
Here are the issues I am having:
1) the "zoom to" and "description" menu items do not appear
2) the drop down menu is only available for the parent groups, not the child layers
3) when the top parent group is expanded, all of the drop down menus disappear for all groups

Also, since I have mostly raster images with stretched data values, is there anyway to "fix" the stretched legend symbol so it does not split the it in the middle? The legends are continuous in ArcMap but then when I publish the maps they come out this way in the viewer. This is not a problem with your tool but with the map service because I also saw this behavior with the ESRI layerlist tool. I have looked on the forums and have not been able to find a fix.
I would also prefer to remove the raster symbol at the bottom of the stretched legend since it is not needed but not a big deal if I can't.

Here is a link to my viewer which is publicly available so you can see some of the behaviors yourself if you want:
http://cquest.arc.nasa.gov:8399/flexviewers/global_cquest/

Thanks in advance for your help and for the cool tools!
0 Kudos
VanessaGenovese
Emerging Contributor
Hi Robert,

One more comment/interesting behavoir...now that I have set "zoom to" to "true" in the xml, the drop down menus are visible for the child layers but that is the only option which shows up in the menus for the child layers.

Thanks,
Vanessa

Robert,

No need to answer issue #1 from my previous post. I just realized that those items are false by default in the xml. I apologize for my ignorance. But the other issues still stand.
And one more question...can you change the behavior of the "expand/collapse all" to only to apply to the subgroups, not the entire dataset/layer list? Also, "select/deselect all" for subgroup visability would be a nice feature too.

Thanks again,
Vanessa
0 Kudos
GrahamWhelan
Emerging Contributor
Hi Robert.

I am using your TOC widget and I have found a small bug which you can re-create with the following steps.

Load up the widget and minimize each layers drop down
Move the Raster up 4 times,
Move Events down 1 time,
Move Parcel Data down 1 time.

The Parcel layer seems to fall out of the tree structure and go down to the end. You can then move other layers down and they also jump to the bottom which causes problems as the bottom layer can have a move down option.

By the way thanks for all the widgets you post they are really helpfull.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Vanessa,

   I will look into these issues when I get a chance.
0 Kudos