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

191465
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
BarnabyRockwell
Deactivated User

More to add.  The problem appears when one or more sublayers of a service are turned off by default in the mxd being published.  Here is an example:

Untitled.jpg

Note the "Alaska" dynamic service, which is turned off by default using the Local Layer widget.  In it, all three layers (Eastern Alaska Range, Pebble Cu-Au-Mo..., and Seward Peninsula) are on by default (as set in mxd).  But in the Seward layer, one of the sublayers (ASTER, shown in red above) is off by default.  This causes a slew of problems.  When the Alaska service is turned on in WAB app, the Seward Landsat 8 data (shown in blue above) are displayed as they should be, but its attributes will not show in the Legend widget, and the ID widget will not show any results for it when a pixel is clicked.  If the ASTER sublayer is turned on, then all behavior becomes normal (Legend is shown and ID widget works). It looks like an initialization problem that is removed once sublayers are toggled.

Of course, the effect of the problem can be minimized by always making all sublayers turned on (or off) by default in the mxd, but this constraint is unfortunate as it limits the ability to customize how complex WAB apps appear when they are first opened.

If the Landsat 8 sublayer is moved to above the ASTER sublayer before the service is published, the same problems occur.

This is a major problem with the Local Layer widget that effects the behavior of default and custom WAB widgets.  Please let me know if you need more info.

----

Edit:  The problem can also be solved by moving the "Seward Peninsula" layer above the "Eastern Alaska" and "Pebble..." layers in the mxd before publishing.

0 Kudos
DanielStoelb
Frequent Contributor

When adding in the layers using the Local Layer Widget, I'm having an issue trying to get them to work with the Time Slider tool.  Is there something that I'm missing that would prevent the time enabled layers added using this widget from not working in the Time Slider?  Is there a workaround for this?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Daniel,

   This widget has not been tested with time aware layers (that I am Aware of) so yes there may likely be an issue here.

0 Kudos
BarnabyRockwell
Deactivated User

From ESRI Tech Support:

After further testing, I have been able to reproduce your machines' behavior. I noticed that after installing the following Server 10.3 patches, and upgrading to Server 10.3.1, the old raster services would fail to restart, and new ones would not publish. As with your instances, repairing the installation fixed both of these problems:

ArcGIS 10.3 for (Desktop / Server) NITF and NCDRD Quality Patch

ArcGIS 10.3 for Server Map Cache Consumption Patch

ArcGIS 10.3 for Server sync with related records Patch

ArcGIS for (Desktop, Engine, Server) Migrate Storage for Oracle Patch

ArcGIS 10.3 for (Desktop, Engine, Server) Spatial Statistics and Space Time Pattern Mining 2 Patch

ArcGIS 10.3 for Server Site Creation Failure and Service Startup Performance Patch

ArcGIS 10.3 (Desktop, Engine, Server) Geocoding General Maintenance Patch

ArcGIS 10.3 (Desktop, Engine, Server) Geodesic Buffer Method Patch

ArcGIS 10.3 (Desktop, Engine, Server) PDF Export for non-US decimal separators Patch

This has been published as BUG-000088077.

Regarding the ability to identify cells on a dynamic map service, I've submitted an enhancement request to allow this in Web AppBuilder (ENH-000088078). However, I can't do the same for the Flex Viewer, as it is being deprecated.

I hope they do implement that enhancement request, as it will allow pop-up-like identification of pixel attributes from thematic rasters in dynamic map services, which is currently possible only using a custom ID widget. 

0 Kudos
NancyMilholland
Deactivated User

Hi -

I'm using the local layer widget in combination with an AGOL map and noticed the following - if there are two map services in the AGOL map, the app on startup will load both services (sometimes in a blink of an eye) and then the first service listed in the AGOL map disappears and doesn't show up in the map, legend, layer list, olr atribute table. If I swap the map service list in AGOL, the service shown changes in the app.

You can see an example AGOL map at http://ngem.maps.arcgis.com/home/webmap/viewer.html?webmap=630cae2b0470427da33e77eebf12a48f

http://ngem.maps.arcgis.com/home/webmap/viewer.html?webmap=630cae2b0470427da33e77eebf12a48f

Both services show up if I use a clean build without the local layer widget. Once I add the local layer widget, the first service disappears. And the missing service shows up if I add it as a dynamic layer in the local layer widget.

Looks like if you use both AGOL and local layers, the AGOL layer list is getting truncated.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nancy,

   I have not paid much attention to this. I mostly just use the layers in the Local Layer widget to supersede everything in the webmap. I will have to look into this.

0 Kudos
ChadRicks
Regular Contributor

I am trying out the local layer widget and I have some problems that I’m not sure if I’m doing it wrong or if it’s a widget problem or a known issue that I’m not aware of.

  • When I update the opacity of the esri imagery service basemap it still shows solid.

{

        "type": "Basemap",

        "name": "basemap",

"layers": {

"layer": [

            {

"url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",

"opacity": 0.56,

"displayLevels": null,

"isReference": false

            }

          ]

        }

      },

1.png

Changing the opacity of a dynamic or feature layers still works fine, it’s just the basemap that isn’t working.

  • The bold legend title shows the name of the service and I wanted to update the legend title without changing the service name.  When I enter the layer name in the local layer the layer list wiget shows that new name, just not the legend.

2.png

  • When I add a dynamic service layer is there a way to hide certain sub-layers from the legend and the layer list? Or even hide the whole layer from the legend?
  • Is there a way to remove sub-layers of a dynamic layer from the map without removing them from the mxd and publishing a new service? I was thinking that the red x under sub-layer actions would remove that sub-layer but I guess it just removes the popup if you made one.

3.png

  • I did have a half way work around where I created a portal map with imagery and set the opacity of the basemap in the web map. Then in the deployed app I update the config.json itemId to the portal map id and it worked for the trasparent basemap. (This only works when I don’t have a basemap set in locallayer) I can also add one additional layer and hide sublayers in the legend but it only lets me add one layer and any additional layers don’t show up.

  "map": {

"3D": false,

"2D": true,

"position": {

"left": 0,

"top": 40,

"right": 0,

"bottom": 0

},

"itemId": "b4d44ccb75814ddd946618fb4509705f",

"mapOptions": {

"extent": {

"xmin": -12817519.037675126,

"ymin": 4329033.604186857,

"xmax": -12816866.934277477,

"ymax": 4329534.625020763,

Any thoughts or suggestions are much appreciated.

0 Kudos
NicholasBarger
Frequent Contributor

So I have been successfully using the local layer widget... works great!  However, I have noticed that I cannot add an cached imagery service as a dynamic service.... let me explain.

In Flex, we were able to define the service type.  So, we could add a cached service as a dynamic service.  In this instance the cached service would zoom in beyond its minimum scale and still display the aerial photos.

Now I am using the WAB local layer widget and I have added the same cached imagery service in as a dynamic service.  I also extended the scale range in the app to be beyond that of the cached imagery.  When I zoom in beyond the minimum scale the aerials do not display.  They are acting like they are still cached even though it was defined as a dynamic service.  Any thoughts?  Robert Scheitlin, GISP

Thanks,

Nick

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nick,

   If you map service has a min and/or max scale defined then this will cause the aerials to turn off after a certain point. I have tested the widget using my cached aerials and adding them as dynamic and then adding LODS all the way down to 17.632766 and they draw fine until they hit my map services maxScale of 500. Right now there is nothing in place in the widget to remove maxScale or minScale set as the map service level.

0 Kudos
NicholasBarger
Frequent Contributor

Hi Robert,

That’s kind of what I thought. Thanks!

~ Nick

0 Kudos