Table of Contents - Legend Widget for FlexViewer 2.x

98533
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
Paul,

   It should be just a change in the UIManager and nothing in the DetailsWindow.
0 Kudos
FrankRoberts
Occasional Contributor III
Robert, I have a 3.0 viewer running off 10.0 Sp4 AGS services.  The services are secured with AGS, and a tokken has been generated and put in the config file.  The viewer loads just fine and I can view the map layers using the "more" button.  However when I launch the TOC widget I get a login prompt.  However, the login prompt doesn't seem to recognize the logins provided (I assume it wan'ts the ArcGISServer accounts I created).  Not sure why it would want me to login.  Here is the error it throws after I type the login/pass.

[ATTACH=CONFIG]17846[/ATTACH]

Any ideas?

Thanks,
Frank
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Frank,

   Is the token included in the url of the map services that you have configured in the main config.xml?
0 Kudos
FrankRoberts
Occasional Contributor III
Thanks for your quick reply!


It is set up as such:
<layer label="Status" type="feature" visible="false"
     token="A90av3k6cC75HbsYVMqpVfulDk3UsfhnZb1TDx0KBesmAIfjCf7puQU6gAQ25fnVpQ2RX6KQxQVwOie9B6nMVw.." 
                   url="http://orator-s.epa.gov/ArcGIS/rest/services/R9ER/EPAR9RemovalWOaklandOpsR9ER/FeatureServer/4"/>

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Frank,

   So that is my widgets issue. One I don't work with secure services so my support for them is pretty minimal... What I have in place right now for this widget, it is looking for the token to be part of the url:

<layer label="Status" type="feature" visible="false"" 
                   url="http://orator-s.epa.gov/ArcGIS/rest/services/R9ER/EPAR9RemovalWOaklandOpsR9ER/FeatureServer/4?token=A90av3k6cC75HbsYVMqpVfulDk3UsfhnZb1TDx0KBesmAIfjCf7puQU6gAQ25fnVpQ2RX6KQxQVwOie9B6nMVw.."/>
0 Kudos
FrankRoberts
Occasional Contributor III
Ok I added the ?token=... after the url for the service but still it is prompting me for the Sign In when I trigger the widget.  I can supply a testing url if that would be handy.  Just a side note, is that I didn't see this with your widget till I switched to 3.0 of the Viewer, and the associated version of the TOC Widget.

Another thing to mention is that I seem to get this behavior when I have a feature service added (type="feature").  So a full dynamic service doesn't seem to cause the behavior.

Any other ideas?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Frank,

   Yes a test url would be great.
0 Kudos
PaulFerro1
New Contributor III
Paul,

   It should be just a change in the UIManager and nothing in the DetailsWindow.


Hi Robert,

I've tested
cssStyleDeclarationRET.setStyle("linkNormalColor", titleColor);
and hyperlinks still come out like
cssStyleDeclarationRET.setStyle("linkNormalColor", textColor);


Would I have to change this to "title" in the DetailsWindow.mxml?
textLayoutFormat.color = getStyle("linkNormalColor")
    textLayoutFormat.textDecoration = TextDecoration.UNDERLINE;
    textLayoutConfiguration.defaultLinkNormalFormat = textLayoutFormat;


Thanks in advance
0 Kudos
JeffersonFerreira_Ferreira
New Contributor III
Hi Robert;

A little question. 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 (TOC Images) there are changes in the other TOC. Do you think there is a way to "detach" an action made at one TOC from another?

Thanks in advance
0 Kudos
AlexanderBrown1
New Contributor II
Hi Robert,


I am utilizing your widget with Flex 2.5.  I was wondering if there was a way to automatically reload the legend at dependent time intervals?

I have two layers that get updated every few minutes, and I was able to get the display map to reflect these changes.  For example:

At minute 1:  layer A - ON  layer B - OFF
At minute 2:  layer A - OFF layer B - ON 
ETC.

I just cannot figure out how to have the legend refresh to show which layers are properly turned on/off.

Thanks,

Alex
0 Kudos