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

109443
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

Hey Andrew, glad to hear you found a workaround; The line you mention is intended to apply any URL parameters after the LocalLayer widget loads all the layers onto the map.  This guarantees that some of the niftier URL parameters like Query still work with LocalLayer.  I'm just starting to assemble a new release, so I'll see if I can fix what you've been running into.

AndrewVentham
New Contributor III

Many thanks Adam!

  I have one other question - or feature request I suppose!
  Would it be possible to extend the widget's proxy mechanism to support a list of "addresses to apply prefix to", rather than a single one?
  I seem to be able to work around this by editing the config.json file in the published apps, but it would be very useful to have the same settings in place when authoring as well.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Hi Adam,

I'm finally getting around to playing with WAB2.5 and setting up a new app with the latest LL 2.5.  I'm also  working on updating my /blogs/myAlaskaGIS/2015/02/04/tips-for-using-the-custom-locallayer-widget-with-wab-dev-edition  document to reflect changes for 2.5.  I was actually able to import a v1.2 app so I had something to compare (and hope to use or at least cut and paste some of my previous customization).

I think I have done everything according to the Readme and my doc, but the LL widget is showing up for the on screen widget slots, not in the middle section.  The imported app is correct.  Do you know off hand what I may have done wrong?  I'm assuming that I just missed something or put something in the incorrect place (I will go back and check)

I know the client\  is correct for the default since creating a new app shows it in the section above the onscreen widgets.  So it must have been when I modified the existing 2.5.  Luckily I haven't done much with it yet, so worse case, I can recreate...but thought maybe this could be a tip if I can figure out the issue.

Thanks so much for all your work on this widget.  It makes life so much easier using the AGS services direct!

edit:  on checking my steps, I think I was missing the

 {
        "uri": "widgets/LocalLayer/Widget",
        "visible": false
      },

in the existing app's root config.json.  It didn't appear fixed at first WAB startup, even after shutting down WAB/Nodejs.  But a couple hours later it looks like it worked.  Must be a lag in the nodejs actually letting go? I do have a note in my doc that mentions that sometimes you need to edit, shutdown and come back in for changes to take place, so I may have visited this before. That probably doesn't make send, but it is ok now. 

0 Kudos
AdamDrackley
Occasional Contributor III

Interesting Rebecca; The browser cache may be holding on to something as well.  I'm glad to hear it's working for you!

Thanks for all the work you've put into your living document; It's a great resource for anyone using the WAB!

0 Kudos
TimHayes
Occasional Contributor III

Rebecca, I am using WAB DE 2.6 with the LL Widget 2.5. I have the same issue of the LL Widget not appearing in the middle batch of on screen widgets, but in bottom batch like your screenshot shows. Any ideas on how you fixed it? I have it working fine in WAB DE 2.4. 

0 Kudos
AdamDrackley
Occasional Contributor III

Did you add the small snippet Rebecca mentions in your stemapp's config.json file, Tim?

I'm interested in how adoption for WAB DE 2.6 goes for people, and how well the current release keeps up with new versions of the WAB as they come out.  I'm really just focusing on refining WAB for 2.5 right now.

Because Esri's making some fundamental changes to the WAB in future releases that might end up requiring some large revisions to the widget, I might end up creating a separate version of the LLW entirely for v2.6+.

One of the many nice things about WAB is that you can keep multiple versions of the DE environment around on separate machines.  On our end, we're likely going to keep a 2.5 version of the WAB around just for creating LLW apps, and have a separate environment with the latest DE builds just to harness the newest functionalities.

If anyone's looking for a 2.5 version of the WAB DE moving forward, I've mirrored it in the repo below.

GitHub - cmndrbensisko/WebAppBuilder2.5: ArcGIS Web App Builder v2.5 

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

And this is the link to the comment I had that worked for me...but I haven't been working with it lately.

https://community.esri.com/message/753118-re-locallayerwidget-version-25-and-accessifizrwidget-layer... 

0 Kudos
TimHayes
Occasional Contributor III

Greetings Adam, the LL Widget works fine in WAB DE 2.6, except for the fact that I want the widget placed per Rebecca's https://community.esri.com/thread/119548-locallayerwidget-and-accessifizrwidget?et=watches.email.thr... (I have added the code snippet she has shown, still no change)

I have been in discussions with Robert Scheitlin regarding this, here is the thread:

https://community.esri.com/thread/210269-locallayer-widget-in-panel 

I welcome any thoughts you may have. 

Based on what you say, your LL Widget was developed for WAB DE 2.5? is this correct?

0 Kudos
AdamDrackley
Occasional Contributor III

Where did you add Rebecca's snippet, Tim?  Adding it to the stemapp should result in proper placement for any apps created AFTER making the change, but I don't think it affects existing apps.  To have it change in existing apps, I believe you need to edit the config.json file in the individual app directory for that app.  Hopefully this info is on the right track, let me know how it goes.

0 Kudos
BarnabyRockwell
Occasional Contributor III

Initial tests suggest that WD 2.5 2-d apps using LL 2.5 widget imported into WD 2.6 will not fully load. 

js.arcgis.com/3.22/xstyle/core/load-css.js:3 Error loading stylesheet /webappbuilder/apps/2/configs/LocalLayer/odds.css
a.onerror @ js.arcgis.com/3.22/xstyle/core/load-css.js:3
js.arcgis.com/3.22/init.js:114 TypeError: LayerInfos.getInstanceSync(...)._initFinalTableInfos is not a function
    at :3344/webappbuilder/apps/2/widgets/LocalLayer/llw.js?wab_dv=2.6:187
    at js.arcgis.com/3.22/init.js:63
    at c (js.arcgis.com/3.22/init.js:103)
    at d (js.arcgis.com/3.22/init.js:103)
    at b.Deferred.resolve.callback (js.arcgis.com/3.22/init.js:105)
    at La (js.arcgis.com/3.22/init.js:2480)
    at Ta (js.arcgis.com/3.22/init.js:2483)
    at Y (js.arcgis.com/3.22/init.js:2482)
    at js.arcgis.com/3.22/init.js:2496
    at c (js.arcgis.com/3.22/init.js:103) "TypeError: LayerInfos.getInstanceSync(...)._initFinalTableInfos is not a function
    at http://internal1_server:3344/webappbuilder/apps/2/widgets/LocalLayer/llw.js?wab_dv=2.6:187:58
    at https://js.arcgis.com/3.22/init.js:63:277
    at c (https://js.arcgis.com/3.22/init.js:103:393)
    at d (https://js.arcgis.com/3.22/init.js:103:182)
    at b.Deferred.resolve.callback (https://js.arcgis.com/3.22/init.js:105:10)
    at La (https://js.arcgis.com/3.22/init.js:2480:415)
    at Ta (https://js.arcgis.com/3.22/init.js:2483:73)
    at Y (https://js.arcgis.com/3.22/init.js:2482:280)
    at https://js.arcgis.com/3.22/init.js:2496:408
    at c (https://js.arcgis.com/3.22/init.js:103:393)"
n @ js.arcgis.com/3.22/init.js:114
setTimeout (async)
l @ js.arcgis.com/3.22/init.js:114
setTimeout (async)
l @ js.arcgis.com/3.22/init.js:114
setTimeout (async)
t @ js.arcgis.com/3.22/init.js:114
t @ js.arcgis.com/3.22/init.js:107
n.reject @ js.arcgis.com/3.22/init.js:109
a @ js.arcgis.com/3.22/init.js:108
l @ js.arcgis.com/3.22/init.js:107
t @ js.arcgis.com/3.22/init.js:107
n.reject @ js.arcgis.com/3.22/init.js:109
a @ js.arcgis.com/3.22/init.js:108
l @ js.arcgis.com/3.22/init.js:107
t @ js.arcgis.com/3.22/init.js:107
n.reject @ js.arcgis.com/3.22/init.js:109
a @ js.arcgis.com/3.22/init.js:108
l @ js.arcgis.com/3.22/init.js:107
t @ js.arcgis.com/3.22/init.js:107
n.reject @ js.arcgis.com/3.22/init.js:109
f @ js.arcgis.com/3.22/init.js:139
e @ js.arcgis.com/3.22/init.js:143
l @ js.arcgis.com/3.22/init.js:141
n @ js.arcgis.com/3.22/init.js:72
load @ js.arcgis.com/3.22/init.js:74
Za @ js.arcgis.com/3.22/init.js:29
ta @ js.arcgis.com/3.22/init.js:30
a @ js.arcgis.com/3.22/init.js:10
(anonymous) @ js.arcgis.com/3.22/init.js:19
ja @ js.arcgis.com/3.22/init.js:28
qa @ js.arcgis.com/3.22/init.js:19
Pa @ js.arcgis.com/3.22/init.js:20
q @ js.arcgis.com/3.22/init.js:10
(anonymous) @ :3344/webappbuilder/apps/2/widgets/LocalLayer/llw.js?wab_dv=2.6:88
ia @ js.arcgis.com/3.22/init.js:28
ia @ js.arcgis.com/3.22/init.js:27
(anonymous) @ js.arcgis.com/3.22/init.js:28
ja @ js.arcgis.com/3.22/init.js:28
ga @ js.arcgis.com/3.22/init.js:28
f @ js.arcgis.com/3.22/init.js:30
(anonymous) @ js.arcgis.com/3.22/init.js:35
odds.css Failed to load resource: the server responded with a status of 404 (Not Found)

0 Kudos