Select to view content in your preferred language

Using ArcGIS API Javascript in Experience builder

1755
3
10-18-2022 06:50 AM
TheGamer
Occasional Contributor

Hi, how is ArcGIS API for Javascript different from Experience builder, i.e. can I use the following code and implement it in experience builder or not?

3 Replies
JeffreyWilkerson
Occasional Contributor III

ArcGIS Javascript API is different than Experience Builder (EB). For EB, you have prebuilt widgets (web pages and widgets that reside on them) that you can select from to create custom interfaces to work with Esri data. It's easier to build things than the JS API but you are still limited in how the widgets work. You can create customized widgets and add them to EB and I saw a Github site awhile back that showed how to extend some Esri widgets for EB.   

For the JS API, you need to build an application which can be just Javascript and HTML, or maybe with C#, Javascript and HTML, or similar. You could do this using Notepad, but that's very difficult. Pretty much everyone uses an Integrated Development Environment (IDE) like Visual Studio to write, compile, and publish the code. In order to have the final site 'published' you need to push it out to an internet service engine, such as Microsoft's IIS or Apache. This needs to be installed on a server that has access to the internet and you can do this in house or buy space on one already in the cloud.

EB has the ability to publish the final product to ArcGIS Online so it doesn't need IIS. An ArcGIS Javascript API application can be built to access data in ArcGIS Online, but it can't reside in ArcGIS Online. The closest thing to building something (custom) and then publishing it to ArcGIS Online is Experience Builder. 

Bottom line, you can't use the code you linked to inside of EB, but you might be able to customize some of the widgets in EB based on the code you find. Need to know Typescript for that.

TheGamer
Occasional Contributor

@JeffreyWilkerson according to the site, i can implement it?

 

0 Kudos
JeffreyWilkerson
Occasional Contributor III

Yes, I started looking at the Github site (https://github.com/Esri/arcgis-experience-builder-sdk-resources ) for extending the widgets and I realize it's only an option when you bring the Experience Builder code into one of your servers (https://developers.arcgis.com/experience-builder/guide/install-guide/ ), so it's not like you can customize what's on ArcGIS Online directly with the JS API code you have.  Once it's loaded on your own server you can customize Experience Builder to your heart's content, but at that point the JS API may, or may not, be a better option. Depends on what you want to do I guess, and how much control you want in customizing widgets and their interactions. I haven't customized Experience Builder at all, yet, so I'm not a good one to ask, but I do want to figure that approach out more myself.