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!
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
November 14, 2016: LocalLayerWidget v2.2 released: This major release includes the following enhancements for the widget:
Release LocalLayer v2.2 · cmndrbensisko/LocalLayer · GitHub
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.
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.
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.
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.
Adam,
Did you test the new widget version using ArcGIS for Server 10.4 by any chance?
Cheers,
Barnaby
I did not; I believe it's only been tested up to 10.31. Are you encountering anything on 10.4?
Unfortunately, yes. It appears that the changes you added since we last communicated prevent my "problematic" dynamic layers (thematic rasters, etc.) from showing up in the Layer List. Those layers appear normally in the LL widget editing GUI.
If I use the Widget.js you made a few months ago (the one not including recent changes), everything works perfectly using Server 10.4.
Note that you have double quotes around these defines at the top:
'esri/symbols/jsonUtils',
'esri/symbols/TextSymbol',
'esri/layers/LabelClass',
'esri/Color',
But changing them to single quotes, as shown above, doesn't fix my issue.
Right, thanks for refreshing my memory Barnaby. WAB seems to use an odd method of ensuring that layers with no visible sublayers are rendered properly; Instead of using the typical layer.setVisibleLayers([-1]) approach to set no visible sublayers as specified in ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript, it seems to expect an array with three -1 values.
We tracked this down last year, but I forgot to put it in the latest release. On line 235 of LocalLayer's Widget's Widget.js file,
if(lOptions.hidelayers.length == 0){
lOptions.hidelayers.push(-1);
}
Becomes,
if(lOptions.hidelayers.length == 0){
lOptions.hidelayers.push(-1);
lOptions.hidelayers.push(-1);
lOptions.hidelayers.push(-1);
}
I'll make sure to patch the release with this change immediately.
Hi Adam,
Thank you very much for the info.
Cheers,
Barnaby
Adam,
Adding those 2 lines back fixes the issue. Will your new version be named 1.3.1?
Cheers,
Barnaby
I've updated the Readme.md to indicate that the bugfixes constitute a new release (1.3.1), and will update the first post of this thread accordingly.
Excellent! Thank you, Adam. I will install 1.3.1 today.
Best regards,
Barnaby
P.S.: It appears to work perfectly so far!
Hi Adam,
Congrats on v1.3 release! 😄
I'll install it now. Thank you for your hard work!
Cheers,
Barnaby
I'm having problems with this map service working in the Local Layer widget.
http://gis.co.wood.wi.us/gis/rest/services/FlexGIS/LandRecordsWGS/MapServer
The service works just fine when going through AGOL. I could go that route but what fun would that be. I can add some of the sublayers but not all. I can add HighwayAnno (21) but the anno displays as gray polygons. Major Roads (15) won't work at all. Roads (15) works but the symbology is lost, it displays a black lines. Addresses (32), PLSS Monument (16), Parcel (5) seem to work as they should.
Any thoughts?