Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

122319
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
EricVenden
Frequent Contributor
Robert,
Is there an option in the latest config file for the TOC (2.3.8) to enable the inclusion of the entire layer name?  It appears to be cut off.  Seems to only happen at certain levels of the TOC (I have many groups of groups)....  See attached.

It appears that if the "biggest" group is not expanded, then it cuts off the rest of the legend entries...as soon as I expand this biggest group (on my site it is floodplains) then the items display.

Thanks much for the improvements to this widget.  It is greatly appreciated.
Thanks
Eric
0 Kudos
DanielMunoz
Regular Contributor
Excellent widget!

I'm experiencing a little issue if the user close (collapses) all the layers, the layer name gets cut off, I checked the demo and also occurs there; the only difference is: un-collapsing (open) the layers revels the full layer name on the demo but not on my download. Any suggestions?

thank you
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   OK I am working on this issue.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   Well this has been a sort of challenging release...Adding in the legend to the TOC. I have the issue with the horizontal clipping resolved now though. Go get the next version 2.3.8.1
0 Kudos
DanielMunoz
Regular Contributor
Beautiful!

I have a silly question where does the tooltip for description and/or copyright information come from?

my *.xml has the tag <metadatatooltip>Show details</metadatatooltip>

I place text in the Description box when i created the service with ArcGIS manager, but i don't get the tooltip icon on the widget. Do i need to create metadata for the layer? any suggestions are very much appreciated.

Thank you!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,


   If you open the MXD and File > Map Document Properties there is a description text box there fill in that for the map service description. For each individual layer in the MXD you can right click on it in the TOC and choose properties and on the general tab there is a description there as well.
0 Kudos
FrankRoberts
Frequent Contributor
Thanks for the latest release! One additional feature to add to the config for the TOC widget would be a width and height of the widget. For some reason, I need to set my width really wide. It almost seems as if there is a larger than necessary boundary between the text of the legend and metadata button. I've attached an image to show you what I mean.

We all greatly appreciate your dedication to nailing this thing.

Thanks again,
Frank
0 Kudos
FrankRoberts
Frequent Contributor
Just noticed that no matter how wide I set the widget, I only get 1/2 the metadata icon on load.  So if I set it to 500 or 600, for somereason only half the icon is displayed.  I can manualy resize the icon, after load and all is well.

fr
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Frank,

   Test this code for me and see if it fixes the issue for you.

Replace the existing measure function in the TocItemRenderer.as under TOC>toc>tocClasses

        override protected function measure():void
        {
            super.measure();
            const tocItem:TocItem = TocItem(data);
    
            // Add space for the checkbox and gaps
            if (isNaN(explicitWidth) && !isNaN(measuredWidth))
            {
                var w:Number = measuredWidth;
                if(tocItem)
                    if(w < tocItem.tocMinWidth)
                        w = tocItem.tocMinWidth - 20;
                if (_vbox && _vbox.numChildren > 0) w += _vbox.measuredWidth;
                measuredWidth = w;
            }
            if (!isNaN(measuredHeight))
            {
                var h:Number = measuredHeight + 5;
                if(_vbox && _vbox.numChildren > 0) h += _vbox.getExplicitOrMeasuredHeight();
                measuredHeight = h;
            }
        }
0 Kudos
FrankRoberts
Frequent Contributor
That code fixes the 1/2 icon on the load.  However in my legend seems like it is forcing it to be pretty wide.  See attached image.

Thanks for the code,
fr
0 Kudos