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!:
November 14, 2016: LocalLayerWidget v2.2 released: This major release includes the following enhancements for the widget:
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.
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.
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.
Did you ever get any resolve to this? We are having similar issues. Few web pages with tons of layers that are being added and removed thus breaking the TOC or visible layers list. The only way we have found to fix this is to reload the layer into the locallayer widget in WAB and save it. From there we copy the widget configs into the live site. Or we just go and modify the bottom of the "config_local_layer_widget.json" file where it says "hidelayers" and add the rest service id of those layers or groups. This becomes tedious as we do multiple updates daily. I was hoping you found a way for the dynamic service to be read instead of the config file from the original deployment. Like you said, everything is published correctly in the mxd and service but not in the web viewer. Please let me know if you ever found a better solution!
Have you tried making an AGOL Web Map and making a WAB viewer which calls that Map and doesn't use LL widget?
I do not fully understand what you are trying to do. Are you making daily changes to mxd and constantly republishing it? If so, I think you will have to update the deployed viewer with the modified LL widget config to get the layers to display in the TOC correctly.
No I haven't tried AGOL. We have our own servers and are actually running 8 ArcGIS servers paired. So the infrastructure looks like 4 AGS's because there is a shared configuration on a disk array for redundancy purposes.
Yes we are constantly adding and removing project files in the mxd. After we do this all the layers are jacked up. We have to let WAB reload the service to pull the changes from the published service then copy the configs over. Not a huge deal, but is taxing when you have about 250services and about 15 people touching them. Granted there are only 2 of us that can access the server and make these changes. I was just hoping for a fix or a better solution then the current workflow.
You could try setting up an AGOL Web Map as a test, adding layers by entering service REST URLs from your servers... I would recommend trying it. It works great for me.
Do your WAB applications use multiple services in each, or just one, Garrett? There's an option to use LocalLayer in "Dynamic" mode, which will just load a service passed to it in the URL with default visibilities and all fields enabled for popup. Would this help at all?
Even if you require multiple services, I think you can pass a pared-down configuration object directly into the application as well. You might be able to use this to load multiple services with no Popup/Visibility information specified, so they'd (hopefully) be inherited directly from the service.
Are these options somewhat on the right track?
Great job on the widget Adam! It's working excellent for me in WAB Dev. I know it's early in development, but is there a way to get your widget to interact with other out of the box WAB widgets....the Attribute Table for instance.
Hey William, I'm glad the widget is working for you. In my experience, the Attribute Table widget is able to work properly with layers imported using the LocalLayer widget. Are you seeing something different in your environment? What type of layer are you importing, and what kind of behaviour are you experiencing when you try to open the Attribute Table widget?
Yeah, I haven't been able to get the Attribute Table to populate with any data and when I open the Attribute Table configuration window the layers aren't showing up to allow for configuration. I'm using secure services from AGS 10.1. I'll do some testing and try services that aren't secured.
Attributes aren't working with unsecured dynamic services added using your widget. When I edit settings of attribute widget, that gui just hangs ("Loading..."), and no layers are shown. Is this a Server 10.3 issue?
The WAB attribute function apparently only works for vector layers anyway, which is completely bogus and will hopefully be fixed in the future by ESRI. Many people use raster-based thematic maps that have attributes!