Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

120766
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
LeroyChristophersen
Emerging Contributor
Leroy,

   Strange that it is not working then...  NO. Is your Map Services Public?


Unfortunately no it is not.  So where is the command line telling the XML where to look for the TOC elements?  As you can tell I am new to this, but following other layer codes, there is a line that designates a particular layer if needed.  Is this widget different.

Do you have a suggestion for learning the basics of working FlexBuilder 4.3?
0 Kudos
EricVenden
Frequent Contributor
Robert,
I am testing your more recent TOC updates to post to our "main" site.  I am having issues with your 2 most recent updates (2.3.8.4 & 2.3.8.5).  I have several annotation features that are displayed with utility data (water main sizes, sanitary main sizes, and storm main sizes).  Each of these annotation features are located under their own respective group (water, sanitary, and storm).  It appears that in the more recent versions of the TOC, the annotation, regardless of group, is either all on or all off.  All the annotation displays if you turn on any of the groups that these classes are located.  The version on our "main" site still has the layer list/legend split out into separate "tabs"...I'm not sure the exact version.

Any ideas here?
Thanks
Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Leroy,

  There is not command line telling the xml where to look. The TOC widget looks at all the layers in the map that are not excluded from the toc in the TOCWidget.xml and requests legends for the map services that are coming from a ArcGIS 10 SP1 or higher server and for a Vanilla ArcGIS 10 Server (no SP) then it makes it's own legend swatches using drawing infos. The little legend swatches are added to the TOC after the check box and before the label or under the label for those with more than one. There is nothing you have to do to make this work. Are you using the uncompiled or compiled version and are you using Flex Viewer 2.3.1?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   I would ask you to double check everything on your end. As I have tested with my Parcel (Cadastral) map service which has a main annotation group and then dozen sub groups containing multiple anno layers and they all work fine individually using Version 2.3.8.5...
0 Kudos
EricVenden
Frequent Contributor
Ok, will do Robert,
Have you removed any of your layers from display in the legend?  Just curious.
Thanks
Eric
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   Hmm... I am not excluding anything from the TOC...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   Nope the exclude is not an issue. Just tested that too.
0 Kudos
EricVenden
Frequent Contributor
Eric,

   Nope the exclude is not an issue. Just tested that too.


Robert,
The TOC works properly when I have the annotation included in the legend.  When I exclude several of the annotation classes from display then all the annotation is on or off - regardless of subgroup.  I have attached a screenshot of the rest page for my utilities service.  If I exclude 5,21,35 from the legend the issue occurs.  If I exclude 6,7 and 22,23 and 36-40 the issue also occurs. 
What I was looking to do is to have 1 toggle to turn off/on the main sizes for each utility.  Could the issue here be the subgroups?
Thanks for your time Robert.
Eric V
Gurnee, IL
0 Kudos
EricVenden
Frequent Contributor
Eric,

   Nope the exclude is not an issue. Just tested that too.


Robert,

Here are the lines I have tried in the config.xml for the TOC:

  <excludelayer mapservice="Utilities">6,7,22,23,36,37,38,39,40</excludelayer>

OR

  <excludelayer mapservice="Utilities">5,21,35</excludelayer>
0 Kudos
JohnCodd
Regular Contributor
Hi Robert,
I am using AGS 9.3.1 and the Sample FlexViewer 2.3.1. Which Legend widget can I use since my map services are created and served from 9.3.1 sp2 sp2 QUI patch?
Thank you very much,

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.
John Codd
0 Kudos