AnsweredAssumed Answered

The FeatureSetChooserForSingleLayer tool

Question asked by kenbuja Champion on May 5, 2017
Latest reply on Aug 30, 2017 by kenbuja

Diving into my first custom widget is much more difficult than I expected! A rant to begin...the documentation for the WAB is dreadful. I continually have to poke through the existing widgets and the jimu.js files to figure out what the different components do and how to implement them properly. And making it configurable in builder is going to be even more digging. This page doesn't even begin to cover the complexities creating a Settings panel and all of its components.

 

That said, I am diving into the deep end early off as I translate one of my existing JS application into WAB. In this widget, a user logs into AGOL to retrieve a specific feature layer, which is added to the map. The map already contains many other layers in a service that is used as background data. The user will then select features from this new layer to change their attributes.

 

I have finished the first step and to do the selection step, I have been examining the Select widget to use some of its functionality. It uses the FeatureSetChooserForMultipleLayers tool for the selection process. There doesn't seem to be any way to programmatically limit the layers that can be selected by the user (in this case, the specific new feature layer that was added) without modifying its base code. But this doesn't make for a tool that I would like to share. The FeatureSetChooserForSingleLayer tool would seem to do this, but it looks to be half-baked in comparison. It doesn't have different types of selection geometries apart from "extent". I haven't come across any widgets that use it.

 

Has anyone used this tool? Will it ever be enhanced to bring it up to the capability of the MultipleLayers tool?

Outcomes