Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

186069
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
GISDev1
Deactivated User
Hi Robert,

A quick question about the new V3.1.2 of your TOC widget.

The source code posted on the gallery found in the download under ./TOCWidget/uncompiled is giving me a different result upon being compiled with the Flex API V3.1 and Flex SDK 4.6 than the compiled version of the widget found in the download under ./TOCWidget/compiled_FV3.1/TOC/TOCWidget.swf.

The difference I'm seeing the the location of the legend swatch in relation to the layer name.
This is for layers with no classification in Arcmap and just simple symbols being used such as a single point for all point features in a feature class (ie. nothing fancy here).

In the source code version, upon being compiled against a totally out-of-the-box Flex Viewer V3.1 (with layerlist visible=false of course), the legend swatch is generated below the layer name, while the compiled version shows the legend swatch to the left of the layer name in between the checkbox for layer visibility and the Layer name.

Would you happen to remember where this legend swatch location information is in the source code?
I have looked all over for something that designates where to place the swatch with no luck (thought it was in toc/toc/toc.as). I am using your V3.0 source code right now (customized) in my V3.1 viewer and it works fine, but I don't have those few upgrades that you added for V3.1 like georss, etc. and would like those if possible.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
GIS Dev,

   That was a pretty complicated change that involves multiple files that I had to make to resolve an issue that someone reported with a class break renderer only having one break. It is to complicated for me to try and explain as it involves the TocMapLayerItem.as, TocLayerInfoItem.as, and the TocItemRenderer.as. It is likely this widget will be rewritten completely soon.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
GIS Dev,

   Here is the GitHub Repo:

https://github.com/rscheitlin/TOC
0 Kudos
AlexMahrou
Deactivated User
Does this work with 10.1? I can't seem to get my legend items to populate at all.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alex,

   I have done testing with a 10.1 server and it works fine...
0 Kudos
AlexMahrou
Deactivated User
Robert,

I could paste my code, but it might be easier to link you to the viewer.

May I pm you a link to my viewer?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alex,

   I have disabled PM in my profile as I answer on the average 6 posts a day and allowing people to contact me though PM would get overwhelming. I can tell you that if you are using secure services than the TOC widget presently does not support them. I can also tell you that esri will be adding legend swatches to their TOC components like the LayerListWidget and MapSwitcherWidget, but a release milestone has not be made public yet (The reason I mention this is because theirs will likely support secure services).
0 Kudos
AlexMahrou
Deactivated User
You nailed it... I'm using secured services. I'll wait for Esri to release this. It's been a long time coming for them to fold the legend widget into the Layer list. Thanks for everything that you do Robert!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alex,

   Now I do have to say if you have your token as part of the url for the services you are using them it will probably work in my TOC.
0 Kudos
DanMiller
Emerging Contributor
Hi Robert and other developers,

Are dynamic layers able to be grayed out for scale dependent rendering?  For some reason, my dynamic layers aren't graying out when their scale is out of range (i.e. disappearing on the map), only type=feature.

Dan
0 Kudos