Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

184443
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
AlisonPage
Regular Contributor
Hi Robert,
Where can you go (which mxml file) to change the color of the check boxes beside each layer? My customer has a hard time seeing the white check on the light gray background.
Thanks, Alison
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alison,

  In the CheckBoxScaleDependant.as you can change these lines:

        public function CheckBoxScaleDependant()
        {
            setStyle("icon", CheckBoxScaleDependantIcon);
            setStyle("checked", this.selected);
            setStyle("scaledependant", _scaledependant);
            setStyle("themeColor", FlexGlobals.topLevelApplication.getStyle("accentColor"));
            setStyle("iconColor", FlexGlobals.topLevelApplication.getStyle("accentColor"));
        }
0 Kudos
LarryPhelps
Regular Contributor
Robert,

When using WMS layers in my map, is there anything I can do to keep the Generating Legend prompt to stop running ?
0 Kudos
LarryPhelps
Regular Contributor
Robert,

When using WMS layers in my map, is there anything I can do to keep the Generating Legend prompt to stop running ?


I think I may have figured this out, let me know if this is the proper check to put in.
At the bottom of the : private function getLegendData(m_layer:*):void

I added :

}else{
    FlexGlobals.topLevelApplication.dispatchEvent(new Event("legendDataLoaded$"));
}
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Larry,

   That is it exactly!
0 Kudos
KarlWilson
Frequent Contributor
Robert,

The right-click menu option "Zoom To Layer Extent" always zooms to the extent of the whole layer, even if only a small subset of of it is displayed via a definition query.

Is it possible to zoom to the extent of just those defined features?

Cheers,
Karl
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Karl,

  I will look into the possibility of this.
0 Kudos
TracyArchibald
Regular Contributor
Nothing?  Finding a fix would really help solve alot of problems...  Even a "It can't be done" would let me look elsewhere...


I'm having a problem with the metadata button not displaying on certain layer types.  Basically, unless it's a 'feature' type, there isn't a button.  We have a few 'dynamic' services that we would like use, but then we can't access the meta data.  I'm pretty sure it's something in how the service is being published...  I THINK there's a field we need to fill in somewhere.  I've gone through this thread, learned from others and ensured there's data under File->Map document Properties under Description as well as Right Click on the Layers -> Properties->General  Description field.

We've looked through the source code, and it looks like should work fine...  Any more thoughts?


Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tracy,

   Once you ensure that the layers did have data in their description field and the Map document it self does did you republish the MSD and then clear your REST cache?
0 Kudos
NCOneMap
Regular Contributor
Using the compiled Flex app V2.4 and TOC V2.4.2. We have an V10 dynamic image service in the TOC and the updating legend circle keeps spinning. It doesn't affect whether the service displays or not in the Flex viewer, but don't want to confuse the users of the app. Any help in how to turn it off? Commenting out <generatinglegendmsg> in the config file didn't help. Thanks!

-- David
0 Kudos