Select to view content in your preferred language

Enhanced Layer List - Metadata (7/17/20)

8666
13
01-10-2017 12:23 PM
by Anonymous User
Not applicable

Enhanced Layer List - Metadata Dialogs   (Tested up to WAB 2.15)

Update July 2017: adds REST Link and 'No Information Available' features.

Update December 2019: Still works great in current WAB (use the code here but insert it in to a current version of the widget.js in the existing 2.14 WAB)

GitHub Link: GitHub - kevinsagis/EnhancedLayerList 

You can see this widget in action at SAGIS Property Map Viewer 

Enhanced Layer List adds metadata Dojo dialogs to display the Description and Copyright text fields from the REST service. This replaces the standard out-of-the-box function that opens a new tab or window to display the Esri REST Service page when a user clicks the "Description" item in the '...' menu on a layer in the Layer List widget, and displays these dialogs instead. This is more friendly to the end user. Also includes LayerListView.js autoexpand mod for the layerlist based on posts from Robert Scheitlin et al in https://community.esri.com/thread/160914

Files that were modified are in widgets\eLayerList\PopupMenu.js and PopupMenuInfo.js

It only displays Copyright if it's present. Same for Description. It won't display a Dialog if there is no description, such as for Group layer IDs.

Tags (2)
13 Replies
by Anonymous User
Not applicable

Hi Melissa Meneghetti‌ - it's just in the folder LayerList, in here EnhancedLayerList/widgets/LayerList at master · kevinsagis/EnhancedLayerList · GitHub  Does that help? My custom code is commented /// kevin m /// where it begins, as well. Does that work for you?

0 Kudos
RudieWatzig
Regular Contributor

Good afternoon,

It's been a while since I've added custom widgets to my developer's addition, so please forgive my dumb question.  I have 2.5, will a 2.4 widget for me?  Also, simply downloading, unzipping and copying the entire EnhancedLayerList folder to \client\stemapp\widgets should get it done, right?  (edit: I've also added it to the widgets list in my config.jsopn) I've done this and the widget doesn't show up on my list of available widgets in the GUI.  Thanks in advance.

by Anonymous User
Not applicable

Look at the two files that are modified, you could copy the modified snippets of code I tweaked, into the new files in the new 2.5 or 2.6, 2.7 etc LayerList widget.   They continue to work. I will update it to 2.7 soon. I would not advise using the 2.4 LayerList in a 2.5 or higher, as they probably have updated other parts of it. But the 'modification' part of it continues to work just fine.  I have done so for some of my 2.5 viewers but I just haven't updated this sample (yet).

The files I modified are:    PopupMenu.js   and PopupMenuInfo.js 

The modifications within the file are denoted by comments... search for 'kevin m', in comments such as   //// kevin m

So, copy those modifications into the layerlist in any newer version of the Builder and its LayerList widget.  Do this to the stemapp widget of LayerList if you want it to be available to all new applications. Review the docs to see what the stemapp folder is and how it works.

I also added HTML titles to explain Draw Scales. For me it's just max. zoom out as a draw scale rule so I just used HTML title attribute. I suggested to Esri they consider making that a default funcitonality in the LayerList; make an on-hover tooltip to note whether zoom in or out based on draw scale rules.

EnhancedLayerList/Widget.html at master · kevinsagis/EnhancedLayerList · GitHub  

Lastly I included Robert Scheitlin's modification to LayerListView as noted to enable popups for all visible layers.

Does this work for you? Let me know how it goes!

0 Kudos
JasperLover
New Contributor

Hi Kevin,

Is there any updates or versioning on this widget.

Is there any requirement on theme using, or published service? It looked to me the results were not consistent when reading two web maps of the same service. 

0 Kudos