Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

120968
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
JeffersonFerreira_Ferreira
Deactivated User
I tried to make the edit in the configure window of the App Builder, but the change doesn't hold. When I save and return to the config window, it shows that it has reverted back. Is there someplace else where I should be making the edit?

Thanks



Kim;

Please attach your xml here, thus I can take a look.
0 Kudos
RhettZufelt
MVP Notable Contributor
Hi, 

I'm using TOC widget 3.0 uncompiled version. Some of my layers have long names and therefore title text is not visible entirely. It is covered by menu items (zoom to, transpareny...etc). How can I fix that? I'm attaching an image so the issue would be clearer. Thaqnks for your help. 
Best regards, 
Petra 


Petra,

That appears to be in this part of the TOCWidget.mxml:

<toccomp:TOC id="toc"
  width="100%"
 height="100%"
 labels="{[ZoomToMakeVisible,ExpandAll,CollapseAll]}"
 useesridescription="{UseNewEsriDescrption}"
 expanded="{expanded}"
 disableZoomTo="{disableZoomTo}"
 fullexpanded="{fullexpand}"
 legendCollapsed="{legendCollapsed}"
  liveScrolling="false"
 variableRowHeight="true"
 tocMinWidth="{wTemplate.width - 45}" scroller="{scr}"
  loader="{boxMessage}" paddingTop="0" paddingBottom="0"/>
</s:Group>


I just hardcoded it to
tocMinWidth="700"
(for the attached example) and it made my "extra long test description" to show.

[ATTACH=CONFIG]18332[/ATTACH]

R_
0 Kudos
JeffersonFerreira_Ferreira
Deactivated User
I'm having a question that don't know how to fix, if someone can help...

I'm trying to use two TOCs in my application: one for dozens of features and other only for satellite images. But they are synchronized in some aspects. When I click "move down" or "move up" in popup menu at right of each layer there are changes in the other TOC. Someone have an idea if there is a way to "detach" an action made at one TOC from another?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jefferson,

   I actually never designed the widget to be used more than once in an application.
0 Kudos
JeffersonFerreira_Ferreira
Deactivated User
Jefferson,

   I actually never designed the widget to be used more than once in an application.


Yes, I know that. But i'm thinking if there's no easy way to accomplish that goal. What do you think? Hard Customizations?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jefferson,

   Yes it would involve so extensive redesign in the code as the move up and move down code for the menu works with the layers in the map directly and not just what is seen in the TOC.
0 Kudos
KimberlyEdmunds1
Emerging Contributor
Kim;

Please attach your xml here, thus I can take a look.


Hi Jefferson - Thanks for hanging in there with me. I feel as though I'm slightly in over my head.

I tried to attach the two xml files that I found under my "TOC Widget/For_AppBuilder3.0" download but received the error message "invalid file." I have not modified those files and do not even know how I would go about that. Perhaps I need to read up on working with xml code?

Kim
0 Kudos
PetraKrsnik
Emerging Contributor
Petra, 

That appears to be in this part of the TOCWidget.mxml: 

<toccomp:TOC id="toc"
  width="100%"
 height="100%"
 labels="{[ZoomToMakeVisible,ExpandAll,CollapseAll]}"
 useesridescription="{UseNewEsriDescrption}"
 expanded="{expanded}"
 disableZoomTo="{disableZoomTo}"
 fullexpanded="{fullexpand}"
 legendCollapsed="{legendCollapsed}"
  liveScrolling="false"
 variableRowHeight="true"
 tocMinWidth="{wTemplate.width - 45}" scroller="{scr}"
  loader="{boxMessage}" paddingTop="0" paddingBottom="0"/>
</s:Group>


I just hardcoded it to  
tocMinWidth="700"
(for the attached example) and it made my "extra long test description" to show. 

[ATTACH=CONFIG]18332[/ATTACH] 

R_


Thank you, Rhett. That is exactly what I was looking for. 🙂
0 Kudos
FraserHand
Frequent Contributor
Hey Robert,
There is a bug in the widget for the layer popup. private function isMenuEmpty(item:Object) always returns true if the layer doesn't have a scale dependency. The issue is that you do a check against parent, and this is always null for the toclayermenu item.
You actually pass the parent on the popUpForItem call, so this needs to be passed through to the isMenuEmpty so your check if it the TOC can be evaluated.
Cheers,
Fraser
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Fraser,

   Thanks for the bug report. I will look into this.
0 Kudos