Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

118296
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
GaryWine
New Contributor
Very nice tool

However; I am attempting to adjust it's display location. The task looks pretty simple after looking at the code, but I am not able to move the widget to the right side of the display. I am attempting to place it right="20" top="70", but it is not moving. Is there something I am missing, or is the a locked feature.

Thanks

Jeff Frye
Berkely County, WV
0 Kudos
PaulFerro1
New Contributor III
Jeff,

right="90" top="25" works for me.

is your widgecontainer set to: <widgetcontainer layout="float">
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   It would have to run some code like this:

            private function expandAll(item:TocItem):void
            {
                item.collapsed = false;
                _toc.expandChildrenOf(item, true);
                if(item.isGroupLayer()){
                    for each (var item2:TocItem in item.children){
                        expandAll(item2);
                    }
                }
            }


I don't have time to help with much more.
0 Kudos
PaulFerro1
New Contributor III
Thanks Robert for the help!

On what line of the TOCWidget.mxml would I place it?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   It would not go in the TOCWidget.mxml. It would likely need to go into the TOCMapLayerItem.as, but as I said I don't have to time to help you with this customizations specifics.
0 Kudos
GaryWine
New Contributor
Thanx Geo - I never considered looking at that.
0 Kudos
RhettZufelt
MVP Notable Contributor
Hi Robert,

I am using v 2.5 of your TOC. I have written some html in my layer description in ArcMap, then published it as a service.  I want to include hyperlinks in the Details/Description window. See attached screen shot.

My html code is [HTML]<p>For more information, go to: <a href="http://www.oregon.gov/DOGAMI/pages/earthquakes/coastal/tsumaps.aspx" target="_blank"><span style="color:#FFD700">OREGON.gov</span></a></p>[/HTML]

I want to change the hyperlink color to gold, but it's not coming through the swf. file and retains the default blue for the hyperlink. I assume I need to recompile the TOC widget.  Do you know where it the DetailsWindow.mxml I can change the default hyperlink
color?  Thanks so much.


I'm curious as to how you got the description to show in the little window.  For me, it opens up the mapservice page in a new browser window.

Thanks,

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   That is controlled by this tag in the TOCWidget.xml

<usenewesridescription>false</usenewesridescription>
0 Kudos
RhettZufelt
MVP Notable Contributor
if I set that to false, then I do not get the "description" option in the drop down.

If I set it to true, then I get this when i click on it:

[ATTACH=CONFIG]16962[/ATTACH]

istead of the nice little popup looking window from previous post.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   That is because your Service description for your map service is blank, so there is nothing to show.
0 Kudos