Template to use sublayers

5639
1
03-10-2015 05:10 AM

Template to use sublayers

The issue is well known and discussed at different places (here for exemple https://community.esri.com/inbox?objectType=2&objectID=74029 )

You can find an exemple using this template here.

- This widget was developed for ESRI's Classic Viewer to add sub layer visibility

   functionality to it. It won't work in ESRI's new 2015 Classic Viewer layout. For

   other templates additional work would be needed to make the widget compatible with

   the specific layout.

 

- To add the widget to the template, you'll need to instantiate the dojo class:

    require(["eea/module/SubLayerTocMod"], function (SubLayerTocMod) {

            new SubLayerTocMod(<LayerList>);

        });

      

- You'd need to prevent the default layer selector from loading.

- The widget expects to find a configuration variable in the global configOptions object.

   The TOC level represents how many layer levels will the TOC show at maximum. It's an integer and,

   if not set, only the topmost level will be shown.

  

    configOptions.tocLevel

  

 

Widget develloped by Herdis Gudbrandsdottir​ (Thank you)

Attachments
Comments

Can't take the credit - it is a modified version of the TOC by Nianwei: http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109

Version history
Last update:
‎03-10-2015 05:10 AM
Updated by:
Contributors