Wrap a custom widget created by the WebApp Builder to a javascript API module

633
2
Jump to solution
06-02-2020 07:54 AM
YanivLev
New Contributor

Hello all,

I went thru the documentation but I'm pretty new to ESRI and WebApp Builder so not sure if what I'm asking is possible...

Lets say I've created a custom widget using the WebApp Builder (my own template and functionality in its "widget.js" file and so on) - is it possible to wrap it up as an API and consume/require it like esri's other widgets (like "esri/widgets/Expand")?

require([
     "esri/WebScene",
     "esri/views/SceneView",
     "esri/widgets/Expand"
 ], function(
     WebScene,
     SceneView,
     Expand
 ) {‍‍‍‍‍‍‍‍‍

My goal is to create a custom widget using WebApp Builder - but later on to use this widget thru API and not the builder itself.

Is that possible?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Yaniv,

   No that is not an option. WAB widgets have a lot of dependency on the jimu.js library and the whole WAB app structure.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Yaniv,

   No that is not an option. WAB widgets have a lot of dependency on the jimu.js library and the whole WAB app structure.

Egge-Jan_Pollé
MVP Regular Contributor

Hi Yaniv Lev,

It is possible to create your own custom widgets for use in the JS API: Widget development | ArcGIS API for JavaScript 4.15

The ArcGIS for JavaScript API provides a set of ready-to-use widgets. Beginning with version 4.2, it also provides a foundation for you to create custom widgets.

HTH,

Egge-Jan

0 Kudos