Going from ArcGIS API for JS to WAB

2699
15
Jump to solution
01-11-2018 08:38 AM
AbhinavSharma
New Contributor III

Hey guys, I was wondering if there is any documentation available (if it is even possible) about converting a webmap from the javascript api into a widget/webmap on the web app builder. 

As an example I am attempting to create an application where the user can edit features without a popup of any sort appearing. I understand that there is a code sample that does exactly that and i have linked it below. But I am using agol and do not host anything on my own servers, so i need this functionality in the form of a widget.

Linked js example : Edit without editor widget | ArcGIS API for JavaScript 3.23 

Tags (1)
15 Replies
AbhinavSharma
New Contributor III

I made those changes but the error message still shows up.

0 Kudos
Juan_ManuelAngel
Esri Contributor

Hi Ab i get this solution.

This is what you want ?

Firts You need to develope the Widget folder, its look like this, then you need to create your html and your java script code. i am going to attach the code of the widget, you know how to add the widget to the web app builder widget pool?

0 Kudos
AbhinavSharma
New Contributor III

Thank you very much, I will download and compare the code with my own code and see where I made my mistakes. I assume using my own layer (which is hosted on arcgis online) will not be too difficult.

0 Kudos
Juan_ManuelAngel
Esri Contributor

Yeah just use the Web Map in your web app builder and thewidget get the layers to delete the custom layers just delete this lines.

I hope this help to you.

AbhinavSharma
New Contributor III

I just realized that the widget will only populate the layers that you add to it in the .js file. I thought that if this.map is called it retrieves all the information on the map including the layers. 

0 Kudos
AbhinavSharma
New Contributor III

I think I see where my problem is, i defined my functions outside of the startup method whereas you placed everything inside of the startup method. But i tried defining the function as _initEditing and without the underscore (which i believe is what would make into a global function) and I still get the same error. Do you think it is not as simple as that?

0 Kudos