Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

187868
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
Tracy,

   The Service Description is only able to be set in ArcGIS Server Manager for published services. I am struggling to reproduce your issue with the layers Description and or Copyright. So far I have not been able to reproduce the none appearing metadata button.

One thing to remember is that every time you republish your map service it clears your map services description and you have to back into ArcGIS Service Manager and reset it.
0 Kudos
TracyArchibald
Regular Contributor
Tracy,

   The Service Description is only able to be set in ArcGIS Server Manager for published services. I am struggling to reproduce your issue with the layers Description and or Copyright. So far I have not been able to reproduce the none appearing metadata button.

One thing to remember is that every time you republish your map service it clears your map services description and you have to back into ArcGIS Service Manager and reset it.


Thanks for your help Robert, but I still can't seem to get it working...  I've got a service with one layer in it and if I define the layer as:
<layer label="Rail - test" type="feature" visible="true" useamf="false"             url="URL/ArcGISServer/rest/services/test_rail/MapServer/0"> </layer>
It works fine, but if I define it as (with or without the visiblelayers) :
<layer label="Rail - test" type="dynamic" visible="true" useamf="false"             url="URL/ArcGISServer/rest/services/test_rail/MapServer" visiblelayers="0">  </layer>
I don't get a metadata button...

This webmap is still under development and I'm starting to think our contractor has broken something...  😞  If there's anything you can suggest, I'll happily try it!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tracy,

  Last suggestion I have is to create a new mxd with this layer in it specify the desc. field, create the MSD and publish it to ArcGIS Server under a new name and test that new service.
0 Kudos
CharlesHarris
Emerging Contributor
Robert-

Did you ever get a change to look at the interaction between the TOC and the Thematic Query Widget?

Thanks,

Jeremy
0 Kudos
JulianInskip
Frequent Contributor
Hi Robert.

Thanks for the great widget. I am trying to add it into my customised version of the flex viewer (ver 2.2). I am using the API 2.4 and the Flex SDK 4.1 (just updated).

When I build my project, I get an error in the TocMapLayerItem.as file "1119: Access of possibly undefined property configData through a reference with static type com.esri.viewer:ViewerContainer" (see attached file).

Must it definitly use the flex viewer 2.4?

Any ideas why this is? Have I missed something.

Thanks.
Julian.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Julian,

   Yes you must have Flex Viewer 2.4 as there are portions of the code that are dependent on 2.4 as you see with the error you are receiving.
0 Kudos
ShaunWeston
Frequent Contributor
Hi there,

How would you go about referencing a layer in this widget to check to see if it is selected or not?

I've got another widget and I want it to work only if a particular layer on this legend is checked.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Shaun,

   The checkbox in the TOC is controlled by the layers visibility and getting the layer from the map and checking it's visibility would be much less complicated than trying to get a reference to the TOC widget and looping though the TOC items to find the right one.
0 Kudos
FaizanTayyab
Deactivated User
Robert,

is there anyway to control/alter the legend swatch size?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Faizan,

    Depends on what version of server the data is coming from if it is pre 10 than the processRenderer function in the TocMapLayerItem.as controls it if the server is 10.01 or greater then you are really getting into an area where you can screw up the whole rendering and layout of the widget and I will not be giving guidance for that.
0 Kudos