LocalLayerWidget Version 2.5 and AccessifizrWidget Layer - 09/28/2017

110800
507
01-08-2015 07:55 AM
AdamDrackley
Occasional Contributor III

I've been having a blast playing around with the new Web AppBuilder, and have taken a few cracks at putting together some custom Widgets that I'd like to share with the community.  I hope these can assist in everyone's future Mappmaking endeavours!

LocalLayerWidget

LocalLayerWidget v 2.5

September 28 2017 : LocalLayerWidget v2.5 released:  This major release includes the following enhancements for the widget.  Thanks to everyone who's donated!:

Release LocalLayerWidget 2.5 · cmndrbensisko/LocalLayer · GitHub 

  • Support for 2.5 Release of ArcGIS Web App Builder
  • Support for Custom Layers via Transformers
  • Demos and sample apps
  • Prototype 3D Widget
  • Dynamic GUI changes at runtime and css insertion via odds.json/odds.css
  • And more!

November 14, 2016: LocalLayerWidget v2.2 released:  This major release includes the following enhancements for the widget:

Release LocalLayer v2.2 · cmndrbensisko/LocalLayer · GitHub 

  • Related Table Viewing and Editing
  • ImageService Viewing and Popups
  • WMS Service Viewing and Popups
  • Ability to integrate with the IncidentAnalysis widget
  • Hide Layer In Legend capability added
  • Dynamic mode added, allowing for URL-fed configuration files
  • And more!

May 18, 2016: LocalLayerWidget v.2.0 released:  This substantial change for Web App Builder v.2.0. removes the need to edit any core files in the Web App Builder, unlike previous versions.  A slight change will still be necessary for the AttributeTable widget to work properly with LocalLayerWidget layers.

  • https://github.com/cmndrbensisko/LocalLayer/releases/tag/v2.0
  • Enhancements:
    • Added autorefresh capability for dynamic layers, and sub-minute decimal values can be specified for time.
    • Added support for non-consecutive sublayer numbering to support 10.3.1 mapservices
    • Editor Tracking via an organizational Active Directory instead of ArcGIS Online User now supported
  • Bug Fixes:
    • View Attachments now works for Dynamic Layers
    • Addition of GeoJson layers fixed
    • Fix to MapService sublayer visibility when no sublayers are selected to display by default.

Mar 29, 2016: LocalLayerWidget v.1.3.1 released; Contains bugfixes to v.1.3. related to custom rendering for Feature Layers and toggling sublayer visibility in the LayerList widget.

Mar 22, 2016: LocalLayerWidget v.1.3 is now available!  (Note the version naming change; Version 1.3 refers to its compatibility with v1.3 of the WAB - This is indeed the latest version of the widget as of March 22, 2016).  Be sure to read the github page to see what tweaks need to be made to ensure that everything continues running smoothly in version 1.3 of the Web AppBuilder.

  • Includes support for GeoJSON and WebTileLayers
  • Custom Symbology and Labelling Options for Feature Layers
    • Currently requires the use of playground to generate custom json layer and label styling for Feature Layers.  For more information, please follow the instructions on the Github page.

Feb 10, 2015: LocalLayerWidget v.1.5 is now available!  This release contains full support for adding Tiled layers to your application directly from ArcGIS Server, in addition to the Basemap, Dynamic, and Feature layers available before.  Feel free to grab the widget from our Release page located at https://github.com/cmndrbensisko/LocalLayer/releases.

Feb 2, 2015: LocalLayerWidget v.1.2 is now available!  This release provides a great GUI developed by Robert Scheitlin to more easily add Feature, Dynamic, and Basemap layers to your ArcGIS Web AppBuilder Applications.  Take it for a spin, and please keep us informed of any bugs or desired enhancements through our Github Issue Tracker located at https://github.com/cmndrbensisko/LocalLayerWidget/issues.

Jan 12, 2015: Note that LocalLayerWidget v.1.1 is now available, which provides Click-To-Identify support and the option to add Feature and Basemap layers in addition to Dynamic layers.

The LocalLayer Widget is intended to allow the direct addition of MapServices to an ArcGIS Web AppBuilder application, without needing to wrap the desired services in an ArcGIS Online/Portal Web Map.

https://github.com/cmndrbensisko/LocalLayerWidget

Basically, your basemap will still need to come from Portal/AGOL, but otherwise you just provide direct URLs to your own MapServices in the widget's configuration settings.  The MapServices should load and display as usual in the map, and cooperate with the Legend, LayerList, and Attribute Table widgets. Click-To-Identify functionality won't work currently, though, because the current WAB implementation relies on Portal for all the popup info.  As stated in the January 12th 2015 release, popups are fully customizable.  Note that it's not an in-panel widget, so you'll need to follow a few extra steps in the project's Readme file.

AccessifizrWidget

Let's make Mapps accessible for everyone!  With an eye on WCAG compliance, the Accessifizr Widget is designed to help make web applications keyboard navigable without having to modify core application code and UI.

https://github.com/cmndrbensisko/AccessifizrWidget

Information about how to configure this widget is available in the core Accessifizr.js library project available here‌, but the gist is that you create a JSON-based 'roadmap' detailing the keyboard navigation of your web application, and how it should change in response to users entering modal menus, hitting the escape button, etc.  For applying descriptive alternate text to page elements, the widget leverages dojo's built-in internationalization support to specify multilingual alternate text strings.  The end result is a web app that, hopefully, is a bit easier to use for people with mobility or visual challenges.

507 Replies
BarnabyRockwell
Occasional Contributor III

Without the edit to Att. Table settings.js, my Att. Table config file is not read, and no layers show in Att. Table widget editing GUI, just as with earlier WAB and LL widget versions.  

I already configured the LL widget using the GUI and exited with OK before opening Att. Table widget.  I did it again, and I get same results, shown below, for which the Att. Table widget is clean and default, no edits at all.

  1. No layers show in Att. Table widget editing GUI
  2. Only one dynamic layer shows data in Att. Table widget

I may have to somehow make Att. Table widget start from scratch and read layers, requiring a laborious reconfig of my Att. Table config.  

0 Kudos
AdamDrackley
Occasional Contributor III

That's unexpected, Barnaby.  Would you be able to send me your LocalLayer configuration file, and I can see if I can reproduce this on my end?

0 Kudos
BarnabyRockwell
Occasional Contributor III

Sent!

0 Kudos
AdamDrackley
Occasional Contributor III

Let's try that again, Barnaby.  I've made a change to the 2.2 candidate; Please try the latest version in your environment and let me know if the AttributeTable works better.

I can reproduce what you're talking about Andžej; I'll start looking into what might be happening here.

BarnabyRockwell
Occasional Contributor III

Adam,

With new beta, my Attribute Table looks good in WAB Dev editor with data from all layers loaded.  However, after I save the app and then launch it, only one layer shows in Attribute Table.  After saving, if I enter app editor again, the Attribute Table again shows data from only one layer.  So somehow the changes to the Attribute Table are not being saved properly.

I'm still getting the issue in the Layer List when I turn on the bottom-most dynamic layer, the underlying two image service layers also turn on.

-Barnaby

0 Kudos
AdamDrackley
Occasional Contributor III

Thanks Barnaby, let's try another round of testing.  Not sure if this would directly fix the issue you're seeing with those Landsat layers, but I've put out another release that should address the issues that Andžej and Babatope ran into.  Note that if you want to add Related Tables to the Attribute Table, configure Related Tables within the Edit widget, or configure a LocalLayer layer within the IncidentAnalysis widget, I'm seeing that a map Save and Page-Refresh is necessary for LocalLayer layers to be 'seen' by the configuration menus.

GitHub - cmndrbensisko/LocalLayer at LocalLayer2.2 

 

It cooperates well on my machine, but I'd be interested to see if you run into issues with it in your environments.  The only issue I'm seeing is that for MapServices that have scale-dependent sublayer visibilities turned on, the legend seems to consistently be one zoom level out of sync with the sublayer visibilities on the map.  If you could see if this happens on your ends, it would be greatly appreciated.

deleted-user-CQZbjNeBXm49
Occasional Contributor III

Hi Adam ,

I had buy you a nice drink if you were close, they all work well on my application and I don't have the problem you described here "MapServices that have scale-dependent sublayer visibilities turned on". Thank you for the amazing updates especially the "Print/Legend" issue, and also can't waiting for version 2.2.1 that will hopefully support OGC standards, which as a Government entity is vital to reducing administrative workflow of dataset updating and requesting from other governmental agencies who have published this datasets with OGC capabilities.

Baba

0 Kudos
BarnabyRockwell
Occasional Contributor III

Hi Adam,

With new beta, the attribute table now shows all layers properly without the edit to the settings.js file of the Att. Table widget!

However, the edits to the Att. Table widget shown here now do not work:

https://community.esri.com/message/599544 

so there is no way to have Att. Table layer names read from the Att. Table config file as in LL widget 2.0.  This is a very important issue for me, and it is unfortunate that esri removed the ability to control layer names in Att. Table using the config file starting with WAB Dev 2.0.  Would it be possible for you to make a change to LL widget, or suggest another edit to Att. Table widget, that would again make names for Att. Table layers readable from Att. Table config file?

Also, the two image layers always both turn on when the Landsat 8 dynamic layer is turned on, as in previous betas. 

However, if I change the name of the image layers so that they do not start with "Landsat 8," then the layers do not turn on when the Landsat 8 dynamic layer is turned on, and all is good.  Perhaps you could edit the LL widget so that layer names do not affect layer visibility toggling?

Also, when I changed image layer names and switched around layer ordering in LL widget editing GUI and clicked OK, I'm occasionally getting endless hangs of the editor accompanied by CPU thrashing, as happened in old versions of LL widget in the past.

Cheers,

Barnaby

0 Kudos
AdamDrackley
Occasional Contributor III

Hey Barnaby, good sleuthing on these bugs.  Some of them seem to be bugs related more to the WAB than the LL widget necessarily, but we can try hacking around them if necessary.

Regarding attribute table names, I'm seeing what might possibly be a bug in the code for the _ResourceManager.js file under the AttributeTable widget directory.  In your instance, try changing line 89 from this,

return layerInfo.show && mLayerInfo &&
(layerInfo.name = mLayerInfo.name || mLayerInfo.title);

To this,

return layerInfo.show && mLayerInfo //&&
//(layerInfo.name = mLayerInfo.name || mLayerInfo.title);

I think these lines might accidently be assigning when they're supposed to be comparing.  Otherwise, this should use whatever 'name' values your layers have in the AttributeTable config file.

Regarding the LayerList issue, my hunch was that the similarity of those two layernames was causing them to step on each others toes when toggling visibility, likely due to a too-strict string comparison happening somewhere.  Not too sure how to tackle this one yet; Does a map added via an ArcGIS Online webmap display the same legend behavior?

I've put out a new release that allows for adding WMS layers.  I've been having some success adding WMTS layers via the WebTile option.  This will likely be the extent of major upgrades for this release; WFS will wait for 2.3.

BarnabyRockwell
Occasional Contributor III

Adam,

No, an AGOL WAB app does not have the same issue with visibility toggling with similarly-named layers.

Regarding your suggested edit to _ResourceManager.js file,

return layerInfo.show && mLayerInfo //&&
//(layerInfo.name = mLayerInfo.name || mLayerInfo.title);

do you mean that everything after the first mLayerInfo should be commented out (everything in BOLD above commented out)?  If so, then it still doesn't read names from config file.

0 Kudos