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

110926
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
AdamDrackley
Occasional Contributor III

Groan, reintroducing that code also seems to mess with the operational layers list visibilities.  You may need to go back to the following hackaround we did back in January for your particular setup;

On line 624 of the NOAA/jimu.js/LayerInfos/LayerInfoForMapServices.js file, you should see a function called _bindEvent.  Change it to match the code below (added portions bolded);
    _bindEvent: function() {
      this.inherited(arguments);
      if(this.layerObject && !this.layerObject.empty && !this.layerObject.connected) {
        this.layerObject.on('visible-layers-change',
                            lang.hitch(this, this._onVisibleLayersChanged));
        this.layerObject.connected = true;
      }
    },
0 Kudos
BarnabyRockwell
Occasional Contributor III

Groan is right.  I have no desire to change that code just for my apps.  May be best to live with the hangs...  But I'll check to see if commenting out the code results in any issues with operational layer visibility.

Edit:

Adam, does adding that (old) code on your end have a downside?

0 Kudos
AdamDrackley
Occasional Contributor III

Well,first we should pin down whether or not even adding that code does anything to help the situation you're running into.  Are you finding that adding the (old) code does anything to improve your hangs?

0 Kudos
BarnabyRockwell
Occasional Contributor III

I have found a showstopper issue.  Using latest beta in a deployed WD 2.2 app, I am getting unresponsive browser (hangs) when I try and turn on sub- and sub-sub layers in a dynamic service.  These hangs did not occur in LL 2.0, which works perfectly.  Here is a test app using latest beta:

ArcGIS Web Application 

Use bookmarks to zoom to Tintic mining district, UT.  Then, in Layer List, turn on Regional Studies dynamic layer, then turn on Tintic mining district, UT (you may see a delay even here after clicking on), then try and turn on one or more of the layers under that.  There are delays of up to 10 seconds after you toggle a sublayer on, resulting in a temporarily hung browser.

I don't know if these hangs are related to the hangs I mentioned earlier that occur sometimes when you click OK in LL widget editing gui when edting an app in WD 2.2.

Here is perfectly functional WD 2.2 app using LL widget 2.0:

ArcGIS Web Application 

It appears that lots of code has been removed for LL 2.2, including code to stop hangs.  Apparently this code was removed to mitigate layer visibility toggling issues perhaps related to the addition of new functionality in LL 2.2 (e.g. image/wms layer capability).  From my current perspective, removing this code was a mistake, as it is apparently causing other severe issues which degrade core app functionality.

I will again (groan) test my apps with latest beta to see if there is something I can do on my end to fix the issue, including adding back in the code which Adam removed.

0 Kudos
AdamDrackley
Occasional Contributor III

This is great Barnaby, I have a feeling that the hanging issue you've found is related to the previous  issue you mentioned which was no longer being fixed by those _bindEvent hitches in 2.2. I removed that code because it was leading to the last-layer-toggling issue we found, and it doesn't seem to fulfill its intended purpose anymore of preventing redundant event binding when new layers are added.

If you can keep your bugged app up, I can use it to try to pin down a proper fix for this issue.

0 Kudos
BarnabyRockwell
Occasional Contributor III

I'll keep the bugged app up for as long as you want. 

Since it appears that you may release another beta, I will suspend testing of current beta.

0 Kudos
AdamDrackley
Occasional Contributor III

Hey Barnaby, I think I've got a potential fix for you to test in the candidate version.  I've re-introduced the code that I had previously commented out, but to combat the issue of the final-layer-not-toggling, I now add and remove a dummy layer  as a final step to ensure that all 'real' layers get properly initialized by the WAB.  Let me know if this seems to solve the issue on your end, or introduce anything new.  I think the very active testing you guys are putting the widget through is going to make this a great release.

0 Kudos
BarnabyRockwell
Occasional Contributor III

Adam,

First tests suggest that new beta works perfectly!  No issues found, and it's lightning fast.

Good job,

Barnaby

deleted-user-CQZbjNeBXm49
Occasional Contributor III

Hi Adam,

Have been playing around with the WMS and I seem to notice that the "Opacity" has no effect on the "WMS Layers", might be an issue on my end but that is what I have observed. Thanks for the amazing work.

EDIT:

Ramon is very right that when you deploy the app on a web server (IIS) the WMS layers fail to render (or show the sub-layers on the layerlistview) on the map.

Test on WAB server

Deployed on Web (IIS) Server:

No "Expand" image for sub-layer(s)

Baba

0 Kudos
AndžejMiloš
New Contributor II

Adam,

I have made some test with my dynamic services and it seems to me that switching layers works good now.

There is an issue I fount today that was not in previous version: Layers groups within all dynamic services are checked on as not visible in map and layer list. They should be visible, as they are published as visible. And also in LocalLayer Edit Dynamic Layer window they are also marked as visible. 

How can I make them visible on widget startup ?

0 Kudos