Select to view content in your preferred language

Enhanced Layer List Widget

8945
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
DerekHunter1
Deactivated User
I am having issues with the Zoom to option.  In certain grouped and non-grouped layers in a given service the Zoom to option zooms to latitude 0 longitude -105.  When the zoom to function works incorrectly, it crashes the viewer.

Please let me know if any of your users has experienced the same.
0 Kudos
GISDev1
Deactivated User
I am having issues with the Zoom to option.  In certain grouped and non-grouped layers in a given service the Zoom to option zooms to latitude 0 longitude -105.  When the zoom to function works incorrectly, it crashes the viewer.

Please let me know if any of your users has experienced the same.


Have you checked the full extent parameter in your REST service, to make sure it is correct? Try the zoom to function on the same layers that are causing the issue in the arcgisonline javascript viewer and see if it zooms to the proper location.
0 Kudos
DerekHunter1
Deactivated User
Thanks for you advice. I have gone back to the mxd and set the full extent to the proper extent and republished.  The zoom to function for the service works, but the individual layers don't behave consistently for the zoom to function.  Some work, some don't.

Have you checked the full extent parameter in your REST service, to make sure it is correct? Try the zoom to function on the same layers that are causing the issue in the arcgisonline javascript viewer and see if it zooms to the proper location.
0 Kudos
GISDev1
Deactivated User
Thanks for you advice. I have gone back to the mxd and set the full extent to the proper extent and republished.  The zoom to function for the service works, but the individual layers don't behave consistently for the zoom to function.  Some work, some don't.


So for the problem layers that don't zoom properly, do they zoom to a really small extent showing the whole world or down to (0,0) or what happens when you click Zoom To? For these problem layers, do they function properly in the mxd and in the javascript viewer?
0 Kudos
AaronKreag
Deactivated User
Edited- Robert, actually it is taking the order of the layers under the operationallayers tag but it is taking them from the bottom of the list up so they display in the TOC/Legend in the opposite order they are listed in the main config.xml.


Robert,

I am using the elayerlistwidget and noticed a couple different things.

The widget does not honor the layer order in which they fall under the operationallayers tag in the main config.xml.  For some reason I have six rest services in here and it defaults to listing them in the TOC in alphabetical order based on the label name that is used in the main config.xml.

Do you know if its possible (and how) to tell it to honor the order the layers are listed in the main config?

Also, when I have the TOC open and click on the small down arrow arrow to the right of my layer name in the TOC and say "move down", it moved down three layers instead of just one.  When I click it again and say "move up", it actually moves it down one.  Not sure whats up there.

Any insight?  Thank you!  Aaron
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   The listing of layers is in keeping with the 'norm'. You will see it the same way in the OTB layer list widget. As far as the moving of layer issue I have not seen any behavior like this since my older TOC Widget. I tested the eLayer List widget a couple of time just now and can not reproduce what you are seeing. Is it possible that you have the OTB LayerList widget and the eLayerList widget in the same app? You don't have my OLD TOC Widget in the app do you?
0 Kudos
AaronKreag
Deactivated User
Robert-

So I went through and deleted all of the layer widgets.  I deleted all of the zipped elayerlist widget installer files too.  Once it was all clean and no trace of the widget anywhere I went to the gallery and re-downloaded the latest 3.6 elayerlist widget.  I used the 3.6 Viewer for Flex and installed the custom widget successfully.  I added it to the map. Cleared out everything..caches, history, etc.  I opened the web map and the enhanced layer list widget is still goofing up with the "move up" and "move down".  Moving the top layer down puts it into the second from last position.  Saying then move up, moves it down to the last position.  Not sure where to go at this point....

I am using the latest version of Google Chrome.

Thank you.  Aaron
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   I don't know what to tell you either as I just tested the eLayerList Widgets live preview site using the latest version of Chrome and it did not have any issue with moving layers
0 Kudos
ArthurRodriguez
Emerging Contributor
Hello Robert,

Thank you for providing such a useful tool!  I did have a couple of (hopefully) quick questions:

1) When using the "ESRI Descriptions Off" option, it looks like the descriptions are not coming through for my tile services, or at least the description button is not available.  All of my feature services have the "Description" option, and if I turn "On" the ESRI Descriptions, then it does show up as an option for all services.  When that is off, however, the Description option is no longer available for tile services.  I have checked, and these services do have a description shown on the Rest page.  Any idea why this may be?

2) What should the "Zoom to make layer visible" zoom to?  Should it just be the center of the map, and then zoom to the visible extent scale of the given layer?  Or is that set in the mxd when making the initial service?  I have several layers this could work great for, but at the moment that button does not seem to be doing anything for them.

Thanks again!!
-Arthur
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Arthur,


  1.    So I have code in the widget that if the layer is a ArcGISTiledMapServiceLayer it will run a getDetails request from the Rest Service endpoint and if those details have  a Service Description or a copyright then a string using the description + line break + copyright are set as that layers internal tooltip and that is what is displayed in the popup description dialog.

  2. The "Zoom to make layer visible" does nothing with re-centering the map it just sets the maps scale to make the layer visible based on the layers minscale or maxscale as reported in the Rest Service endpoint. Make sure if the layer is grouped you are executing this option from one of the sub layers.

0 Kudos