Select to view content in your preferred language

Enhanced Layer List Widget

9024
36
07-16-2013 09:59 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is my latest widget for Flex Viewer. It is the first 3.4 widget I have been able to publish due to some issues with ArcGIS.com.

This is my replacement to the TOC Widget

This  widget provides an enhanced version of the Layer List Widget for the  Flex Viewer. This enhanced version contains UI enhancements that are  currently request for the OTB version, such as extended layer menu that  contains collapse all, expand all, zoom to make visible, and changed  behavior on the description option. The enhanced version also supports  legends for CSVLayer and GeoRSSLayers as well a default legends for  basemap rasters, annotation and raster catalogs.

It is recommended that you use this widget in Application Builder 3.4 as it has been fully integrated into the App Builder GUI and you will not have to deal with XML.

http://www.arcgis.com/home/item.html?id=58d9bb5693c94918a3934781d7234d18
Tags (2)
0 Kudos
36 Replies
GiosiaPoma
Regular Contributor
Hi Robert,
great job! Thank you.

I've implemented, in the old TOC, some code to hide layer not visible in scale range: in the addChild of TocITem.as I've inserted as filterFunction my function.
This function is overridden in TocMapLAyerItem.as and TocLayerInfoItem.as. It checks if isInScaleRange is true. Now I can't know where insert the children.refresh() . In the old TOC widget I've inserted the refresh in the TocItem.as in set scaledependat function. Now? I try to insert the parent.children.refresh() in the setIsInScaleRange... There is a better place for doing this kind of job?

Thank you for the support.
0 Kudos
deleted-user-OvQ2biYmIWQS
Deactivated User
Hi Robert,

First of all thanks for this widget, it is great as well! I am using ArcGIS Viewer for Flex 3.5 and it works as described but was wondering if there was a way to disable the "zoom to" option for all layers as it is confusing since it pans over to where I saved  the map at before I published it and not necessarily to the scale dependent layer itself.  The layers are dynamic if that makes a difference.

[ATTACH=CONFIG]28231[/ATTACH]

I have tried to set the <disablezoomtomenuoption> to both false and true and that doesn't make a difference for what I am doing. I like the zoom to make visible option however, it is very helpful and only want that one.

Here is the eLayerListWidget.xml: 
<?xml version="1.0" ?>
<configuration>
    <labels>
        <visibilitylabel>Layer Visibility</visibilitylabel>
        <expandall>Expand All Layers</expandall>
        <collapseall>Collapse All Layers</collapseall>
        <zoomtomakevisible>Zoom To Make Visible</zoomtomakevisible>
    </labels>
    <tocsettings>
        <collapselegends>false</collapselegends>
        <disablezoomtomenuoption>false</disablezoomtomenuoption>
        <expanded everything="false">false</expanded>
    </tocsettings>
    <excludegraphiclayers>true</excludegraphiclayers>
    <excludebasemaplayers>true</excludebasemaplayers>
    <usenewesridescription>false</usenewesridescription>
    <excludelayers>
        <excludelayer mapservice="Property Web"/>
    </excludelayers>
</configuration>


Any ideas on how I can achieve this? :confused:
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nancy,

   That looks like a Bug in the widget. I will update and release a fix ASAP.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nancy,

   Version 3.5.1 now fixes this Bug.
0 Kudos
deleted-user-OvQ2biYmIWQS
Deactivated User
Robert,

Thanks so  much for the quick find/fix.  You can see the difference in the settings, however I'm still seeing the option for certain layers. It seems that the "zoom to" option is still available but not sure why.  I am looking at the REST end point information and the only thing that differs between the layers that have the "zoom to" option and that have them removed is the scale dependent drawing of the layer.  The layers that display "zoom to" option regardless of whether I have the option disabled are only shown after about 4k, those that have the option removed display up to 150k.  Is there a way to remove the "zoom to" for all layers but keep the "zoom to make visible" for those layers that are scale dependent? I have attached the picture of what I'm seeing and circled what I want to remove in blue if that helps.   [ATTACH=CONFIG]28313[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nancy,

   This must be a bug and I will have to look into it for a future release.
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Myself not being a programmer, I am wondering if it is possible to have the eLayerList span (in height) the browser from below the FV header?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

  Not exactly, but you could place it in a panel in the main config.xml:

    <widgetcontainer paneltype="left" initialstate="open" size="300">
            <widget label="Map Contents"
                config="widgets/eLayerList/eLayerListWidget.xml"
                url="widgets/eLayerList/eLayerListWidget.swf"/>
    </widgetcontainer>
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Awesome.  Thx.

Derek,

  Not exactly, but you could place it in a panel in the main config.xml:

    <widgetcontainer paneltype="left" initialstate="open" size="300">
            <widget label="Map Contents"
                config="widgets/eLayerList/eLayerListWidget.xml"
                url="widgets/eLayerList/eLayerListWidget.swf"/>
    </widgetcontainer>
0 Kudos