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

155296
507
01-08-2015 07:55 AM
Labels (1)
AdamDrackley
Frequent Contributor

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
Frequent Contributor

I think there's a few things going on here, Justin.  If you're trying to add each of those sublayers as individual Feature Layers, you're likely to run into some limitations in the Javascript API.  To my knowledge, Annotation layers can't be added to Maps as Feature Layers, even in ArcGIS Online.  Layers that use Cartographic Line Symbols for symbology can't be properly rendered as Feature Layers either, because the REST endpoint doesn't provide the symbology information necessary to render these properly on the client-side.  See Dasa's response in the link below, Composite and Cartographic Line Symbols not returned in Renderer objects

If you want to add that MapService to your Map, I'd try adding the entire \MapServer endpoint to it as a Dynamic layer.

If you still want to break that MapService out into individual layers in your Map, I'd suggest adding multiple \MapServer layers, but configuring the LocalLayer Widget to turn off off all sublayers except the ones you want visible.  IE:  To create a Roads layer, create a Dynamic Layer using the http://gis.co.wood.wi.us/gis/rest/services/FlexGIS/LandRecordsWGS/MapServer url, name it "Roads", and turn the visibility off for all sublayers except layer 15.  For an Annotation layer, do the same thing, name it "Annotation", and turn off all sublayers except sublayer 21.

If you want to 'hide' all the sublayers that you've turned off by default from appearing in the Table of Contents, you could use the modified https://github.com/cmndrbensisko/LayerListLite widget instead of the default LayerList widget to ensure that any sublayers which you haven't made visible by default will remain hidden in the TOC.  As a result, despite being a Dynamic Layer, your "Annotation" layer would only contain an entry for sublayer 21 in the TOC.

Just some food for thought, hope this info helps.

BarnabyRockwell
Deactivated User

Argh!  I just went operational with my WAB Dev 1.3 apps yesterday, along with LL widget 1.3.1, and today WAB Dev 2.0 was released!   

Edit:  Initial testing suggests that LL widget 1.3.1 works perfectly in a WAB Dev 1.3 app imported into WAB Dev 2.0. Good job, Adam and Robert!    More testing ahead...

BarnabyRockwell
Deactivated User

Adam,

There appears to be a relatively minor issue related to the Attribute Table for layers added via LL widget.  I just sent you an e-mail describing it.

Cheers,

Barnaby

PS:  I see now that the same issue occurs in WD 2.0 apps that DO NOT use the LL widget, but call AGOL Web Maps.  So the issue may have nothing to do with LL widget...

WAB Dev 2.0: How to get layer names for Attribute Table widget to be read from config file

0 Kudos
AdamDrackley
Frequent Contributor

Hey Barnaby, I recieved your email, and upon testing I'm even finding this behavior in the 'pure' WAB built into ArcGIS Online.  I'm going to hazard that this likely isn't connected with the LLW; It looks to be bubbling up from the WAB core.

0 Kudos
BarnabyRockwell
Deactivated User

Hi Adam,

I agree, and made another post to my WAB question thread showing the issue in an app that doesn't use LL widget but calls an AGOL Web Map.

Cheers,

Barnaby

0 Kudos
AdamDrackley
Frequent Contributor

Hey all, I've got a candidate version of LocalLayer ready for Web Appbuilder 2.0, and I was hoping to get some intrepid volunteers to help test it!  You'll find the 2.0 branch available at the link below,

GitHub - cmndrbensisko/LocalLayer at LocalLayer2.0

For this version, I've endeavoured to remove the need to play with any of those core 'jimu.js' library files to get everything rolling.  Just add the Widget folder to your /widgets/ directory, add an entry for the widget to the appropriate config.json file, and take it out for a spin!

BarnabyRockwell
Deactivated User

Hi Adam,

I tested it in WD 2.0, and it works perfectly so far.  The various files under jimu.js directory and the Att. Table settings.js files are unedited.  Excellent work.

Unfortunately, I doubt I will use WD 2.0-based apps at all until the issue with the Attribute Table widget layer names is addressed by esri. 

Cheers,

Barnaby

0 Kudos
AdamDrackley
Frequent Contributor

The candidate widget should also work in 1.3 WAB setups as well, without needing to play with the core. It was actually written for 1.3 initially, and I was happy to see it cooperate with 2.0 without any apparent fuss. Feel free to test against both versions.

BarnabyRockwell
Deactivated User

Adam,

On further inspection, it appears that the edit to the Att. Table settings.js file

utils.readConfigLayerInfosFromMap(this.map, false, true)

is still required for Attribute Table info to be read from the layers added via LL widget.  Without the edit, no data will appear in the Att. Table widget editing GUI, although if the Att. Table config file is imported, data from it will populate the Attribute Table widget, NOT INCLUDING the layer names. 

Cheers,

Barnaby

0 Kudos
BarnabyRockwell
Deactivated User

Adam,

I tested LL widget 2.0 in a WD 1.3 app, and it appears to work fine with no edits to files under jimu.js directory.  Attribute Table widget settings.js still requires the edit.

Cheers,

Barnaby

0 Kudos