Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

122415
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
RobertScheitlin__GISP
MVP Emeritus
Graham,

       I will look into this issues when I get a chance.
0 Kudos
WajhuAllah_ArifHussain
New Contributor
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.


Dear Robert,

I am just a begginer to the Flex Development and using your TOC Widget which works great for me, I wanted to do couple of things and not sure with how to go about it, please help me out on these. The task are as follows:

1. In the TOC Widget, I want to be able to select or deselect all Layers (or Group Layers - Top Level Layers) with Ctrl + Click (something similar to ArcMap).
2. I have Utility Systems under which I have my layers. I published my MXD/MSD as a MapService and consuming it inside the Flex Viewer as a Dynamic Service. I want the sub-layers of the each Utility System to be identified by the Flex Viewer as Feature Layers so that in your Enhanced Draw Tool Widget I can Snap to the features.

Any help on these topics will highly be appriciated.

Thanks and best regards,

W. Arif Hussain
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
W. Arif Hussain,

1. For this you would have to capture the click event on each tocitem and check is the shift key is held.
2. TO do that you need to use type = feature not dynamic. Snapping is dependant on have the geometries client side.
0 Kudos
StevenCuthbert
Deactivated User
Hi Robert,

I'm using the 3.0 version with version 10 on a https service. The problem i'm having is when you expand the legend layers out at the lowest level there is no legend displying. It works on our internal server, but when i put it on the cloud it doesn't appear anymore. I've attached a screen shot.

[ATTACH=CONFIG]15550[/ATTACH]

Thanks,
Steve
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Steve,

   You need to use a utility like fiddler to see what http request is failing and why.
0 Kudos
StevenCuthbert
Deactivated User
Hi Robert,

Thanks for the reply. I've used fiddler to look for any processes crashing or being blocked, but nothing is getting flagged. Everything is working...according to fiddler anyway. It works on my internal server (desktop box), but it's failing on my external server (amazon cloud). Therefore i'm assuming it's a setting in the cloud, do you know any settings i could try?

Cheers again
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Steven,

   No, I am not a cloud user.
0 Kudos
PaulFerro1
Deactivated User
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.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   That color is just the default that come from Adobe Flex in general for hyperlinks. To fix that you will have to modify the UIManager.as.

UNTESTED changes:

        //Style RichEditableText
        if (numberOfStyleColors > 4)
        {
            var cssStyleDeclarationRET:CSSStyleDeclaration = new CSSStyleDeclaration();
            cssStyleDeclarationRET.setStyle("focusedTextSelectionColor", rolloverColor);
            cssStyleDeclarationRET.setStyle("unfocusedTextSelectionColor", rolloverColor);
            
            cssStyleDeclarationPopUpRendererLink.setStyle("linkActiveColor", titleColor);
            cssStyleDeclarationPopUpRendererLink.setStyle("linkNormalColor", textColor);
            cssStyleDeclarationPopUpRendererLink.setStyle("linkHoverColor", titleColor);
            
            topLevelStyleManager.setStyleDeclaration("spark.components.RichEditableText", cssStyleDeclarationRET, false);

            var cssStyleDeclarationTI:CSSStyleDeclaration = new CSSStyleDeclaration();
            cssStyleDeclarationTI.setStyle("chromeColor", textColor);
            topLevelStyleManager.setStyleDeclaration("spark.components.TextInput", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("spark.components.TextArea", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("mx.controls.TextInput", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("mx.controls.TextArea", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("mx.controls.VSlider", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("spark.components.VSlider", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("mx.controls.HSlider", cssStyleDeclarationTI, false);
            topLevelStyleManager.setStyleDeclaration("spark.components.HSlider", cssStyleDeclarationTI, false);
        }
0 Kudos
PaulFerro1
Deactivated User
Hi Robert,

I would like to create a clickEvent so that when I check/click the box of one service or layer, it expands all of my layers for just that service. See screenshot.
[ATTACH=CONFIG]16203[/ATTACH]

I'm aware of the [HTML]<tocsettings>
  <expanded>false</expanded>
  <collapselegends>false</collapselegends>
</tocsettings>[/HTML]
but I think I want am after needs to be done in the uncompiled TOC code? Thanks
0 Kudos