Select to view content in your preferred language

Table of Contents - Legend Widget for FlexViewer 2.x

184253
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
Gaurav,

   One more piece of info will help me diagnose this.

Can you attach your main config.xml (strip out what ever you deem necessary or just the map section is necessary).
0 Kudos
GauravMaske
Emerging Contributor
Here is the map section of config.xml -
<map top="0"
         initialextent="-14083000 3139000 -10879000 5458000"
         fullextent="-16677000 2009000 -4819000 8330000"
         esrilogovisible="false"
         openhandcursorvisible="false">
        
        <lods>
   <lod resolution="156543.033928" scale="591657527.591555" level="0"/>
   <lod resolution="78271.5169639999" scale="295828763.795777" level="1"/>
   <lod resolution="39135.7584820001" scale="147914381.897889" level="2"/>
   <lod resolution="19567.8792409999" scale="73957190.948944" level="3"/>
   <lod resolution="9783.93962049996" scale="36978595.474472" level="4"/>
   <lod resolution="4891.96981024998" scale="18489297.737236" level="5"/>
   <lod resolution="2445.98490512499" scale="9244648.868618" level="6"/>
   <lod resolution="1222.99245256249" scale="4622324.434309" level="7"/>
   <lod resolution="611.49622628138" scale="2311162.217155" level="8"/>
   <lod resolution="305.748113140558" scale="1155581.108577" level="9"/>
   <lod resolution="152.874056570411" scale="577790.554289" level="10"/>
   <lod resolution="76.4370282850732" scale="288895.277144" level="11"/>
   <lod resolution="38.2185141425366" scale="144447.638572" level="12"/>
   <lod resolution="19.1092570712683" scale="72223.819286" level="13"/>
   <lod resolution="9.55462853563415" scale="36111.909643" level="14"/>
   <lod resolution="4.77731426794937" scale="18055.954822" level="15"/>
   <lod resolution="2.38865713397468" scale="9027.977411" level="16"/>
   <lod resolution="1.19432856685505" scale="4513.988705" level="17"/>
   <lod resolution="0.597164283559817" scale="2256.994353" level="18"/>
   <lod resolution="0.298582141647617" scale="1128.497176" level="19"/>
        </lods>
       
    
        <basemaps>
       
            <layer label="Streets" type="tiled" displaylevels=""
                   visible="true"  alpha="1"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
                  
            <layer label="Aerial"  type="tiled"
                   visible="false" alpha="1"
                   url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
                  
            <layer label="Aerial"  type="tiled"
                   visible="false" alpha="1"
                   url="http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServe..."/>
                  
            <layer label="Bing Roads" type="bing"
                   visible="false" alpha="1"/>
                  
            <layer label="Bing Hybrid" type="bing"
                   visible="false" alpha="1" style="aerialWithLabels"/>
                  
            <layer label="None" type="tiled"
                   visible="false" alpha="1"
                   url=""/>
                  
        </basemaps>
 
 
  <!--
   A layer's "label" property is also used throughout the application as its name. Many parts
   of the application (particularly the Bridge API) use the layer label (name) to look up and
   manipulate layers. integration-config.xml references the layer label directly also.
  -->
 
        <operationallayers>
       
       
         <!-- NEW: VISIBLE LAYERS ARE RENDERED SERVER-SIDE NOW (as of 6/15/2010) -->
            <layer label="US" type="dynamic" alpha="1" visible="true" format="png32"
                   url="http://<myserver>/ArcGIS/rest/services/GSM_MAP_US_1/MapServer"/>
                  
   <!-- US STORES -->
            <layer label="Location (US)" type="feature" mode="selection" alpha="1" visible="true"
                   url="http://myserver/ArcGIS/rest/services/GSM_MAP_US_1/MapServer/0"/>               
                  
        </operationallayers>
 
    </map>

Thanks,
Gaurav
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Gaurav,

   Thanks for the help. The issue is now resolved in Version 2.3.9.1.
0 Kudos
MarcCavallaro
Regular Contributor
Robert, The TOC widget sure has come a long way, thanks for you perseverance.  I tried out 2.3.9.1 and it loaded properly, but the Generating TOC Legend kept spinning and never went away.  I do have Bing aerials in my operational layers (not my idea). Could that be causing the problem?

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marc,

   Yep the Bing map in the ops layers is an issue for the current version it will be fixed in the 2.3.9.2 version ASAP.
0 Kudos
StuartBlumberg
Emerging Contributor
Robert,

Is there a way to disable the transparency tool altogether?  I have layers with transparencies preset in ArcMap and these layers have labels that are not transparent.  When I have this widget enabled the transparency occurs for the entire layer, including the label.  So basically I want the transparency to be dictated only by ArcMap and not the widget at all.  I tried ripping out any code that had to do with transparencies but that only took the tool off the widget.  Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stuart,

  So are you saying that you want an option to remove the alpha slider completely or what exactly?
0 Kudos
AndrewBlakey1
Emerging Contributor
Is this where I can post about the Legend Widget or should I create a new thread?

I love the widget but am having an issue where opening the last layer group causes the flash container executable to consume 100% CPU time and hemorrhage memory until it crashes.  I've tried making a base application with just that widget and it happens regardless of what legend items I include.  Any obvious suggestions I've missed?

http://nipigon.uwaterloo.ca/sol2fv/  (third widget from left)

Thanks.
0 Kudos
StuartBlumberg
Emerging Contributor
Robert,

Yes, I would like to get rid of the transparency functionality altogether.  Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Andrew,

   I don't know what the issue is YET but I am now looking into it. Hopefully I can resolve it soon.
Thanks for letting me know.
0 Kudos