Table of Contents - Legend Widget for FlexViewer 2.x

98553
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
Ray,

   Strange... Have you tried my dynamic legend widget? I would like to know if it is acting similarly?
0 Kudos
RaymondBlack
New Contributor
Hi Robert,

I've just downloaded the dynamic legend widget now and installed it.  Guess what - it's behaving exactly the same.  Just a blank page.  Must be something to do with how the mapservice is configured.  Do I need to do anything special when I create the mxd?  I have created a lot of customisations for my Flex viewer but I can't think of any that would conflict with your widgets.

Regards,
++ Ray
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ray,

   I have not seen this before or have ever had anyone report this issue... Is your map services publicly accessible?
0 Kudos
RaymondBlack
New Contributor
Hi Robert,

Unfortunately not.  I'm stuck behind firewalls etc. I'll have a go at tracing the code through to see if I can get something a bit more definitive.  An error message would be nice 🙂

Thanks,

++ Ray
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ray,

   Are you using the source code version of the viewer? If so do you have the Flashplayer debug version installed on your machine?
0 Kudos
RaymondBlack
New Contributor
Hi Robert,

Got it!  Here's the catch.  The mxd for the service I was using was created with ArcMap 9.3.1.  I copied this mxd onto our ArcGIS 10 server and created a new map service using the ArcGIS Server manager on this machine.  This mapservice is the one that failed to display the legend.
This morning I copied the mxd onto a machine with ArcMap version 10 and re-published the map service from there.  Bingo! it works.  I think there are some subtle differences between the way that the ArcGIS server manager creates services and the way that ArcMap creates them.  I have also had the server manager fail to create services with raster layers in the past, even though ArcMap creates them just fine. 
Anyway, thanks for the support (and the widget!).  Hope I didn't cause too much panic.

Cheers,

++ Ray
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ray,

  That is great news and I will file away that bit of information for future support efforts.
0 Kudos
MarshallPlants
New Contributor
Robert,

When using the compiled widget, is there anything that can be placed in the TOCWidget.xml to make the layers show up in the collapsed state by default rather than the expanded state?  I have a long list of layers and would like for more of them to show up in the initial window and then make the user expand any that he needs to so that he sees what sub-layers are underneath.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marshall,

   I think what you are asking for is this:

<tocSettings>
  <expanded>false</expanded>
 </tocSettings>
0 Kudos
MarshallPlants
New Contributor
That did it!
Thanks
0 Kudos