The ArcGIS JS API and ArcGIS Portal

321
4
Jump to solution
07-17-2019 09:12 AM
RichardMcGrath
New Contributor

Can the ArcGIS JS API be used to create custom widgets for integration into my local ArcGIS Portal? I went through the Recenter widget exercise, and then attempted to discover a method of integrating that widget into my organization's locally-hosted ArcGIS Portal Web App Builder (WAB). The JS API, as leveraged using TypeScript, Node.js, and npm, does not provide a manifest.json file, nor does it package the CSS, NLS, or other specific items that appear to be necessary for registration with ArcGIS Portal. I'm aware of WAB Developer Edition, but we do not yet have that installed as it takes time to clear new software through our security procedures.

I also do not wish to re-create my own version of Portal using the ArcGIS JS API, as that seems highly inefficient and redundant.

I'm using ArcGIS 10.6, ArcGIS JS API 4.11, and Node.js 8.11.0, on Windows 10 x64.

Any input would be greatly appreciated. Thanks!

-Rich

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Honored Contributor
Can the ArcGIS JS API be used to create custom widgets for integration into my local ArcGIS Portal?

You have to use the JS API to create a widget for Web AppBuilder on your own Portal.

However, you cannot use the methodology from this page to do it. You have to use the coding pattern laid out in the WAB DE links I have in my previous message.

You cannot use the 4.x API to create a widget for a 2D app.

View solution in original post

0 Kudos
4 Replies
KenBuja
MVP Honored Contributor

Yes, you can create a widget that can be used in Portal, but you will need WAB Developer Edition to do any sort of testing before it's deployed. A widget as referenced in the 4.x API is not the same thing as a Web AppBuilder widget. A WAB widget has a defined pattern with a file structure and required files. Is this widget for a 2D or a 3D application? If it's for 2D, then the widget will have to be written using the 3.x API. A 3D widget would be written using the 4.x API.

The documentation has a section on developing your own widget for WAB, but I've preferred using this method for creating the framework for the widget and automatically updating the widget as you modify the code.

0 Kudos
RichardMcGrath
New Contributor

Ken,

So the answer to my question is essentially "no", correct?

-Rich

0 Kudos
KenBuja
MVP Honored Contributor
Can the ArcGIS JS API be used to create custom widgets for integration into my local ArcGIS Portal?

You have to use the JS API to create a widget for Web AppBuilder on your own Portal.

However, you cannot use the methodology from this page to do it. You have to use the coding pattern laid out in the WAB DE links I have in my previous message.

You cannot use the 4.x API to create a widget for a 2D app.

0 Kudos
RichardMcGrath
New Contributor

Ken,

Got it! I will explore those links some more and see how it goes. Thank you for your responses and patience.

-Rich

0 Kudos