Adding widgets to web application

1172
5
03-25-2021 05:19 AM
AndresKasekamp
New Contributor III

I am fairly new to web developing and JavaScript. How can I add ElevationProfile  widget to Web Application? It is not in the stemapp3d folder. Is it only possible to add JavaScript API widgets to Web Scene?

0 Kudos
5 Replies
tigerwoulds
Occasional Contributor III

Web Map = 2D Layers

Web Scene = 3D Layers

You should be able to add JS API Widgets to both. Are you using Web AppBuilder for this?

0 Kudos
AndresKasekamp
New Contributor III

I am using a Web AppBuilder. Where and how to I put the code in the WAB folder so the widget will be added to the scene?

0 Kudos
tigerwoulds
Occasional Contributor III

Navigate to the {Web AppBuilder for ArcGIS Developer Edition installation directory} > WebAppBuilderForArcGIS > client > stemapp > widgets and copy the ElevationProfile folder into this location.

Add Custom Widgets to Web AppBuilder for ArcGIS Developer Edition (esri.com)

0 Kudos
AndresKasekamp
New Contributor III

I tried it, but the widget it will only work with 2d maps, not with 3d scenes.

0 Kudos
JeffreyWilkerson
Occasional Contributor III

Using the Javascript API (4.x) you can add the ElevationProfile widget to a Web Scene.  The example that you pointed to does exactly that.  Look at the 'sandbox' to see the exact code.  In order to use this you will need to put the file (a single HTML page for this example) into a and internet management service (Internet Information Server (IIS) for Windows, or Apache for Linux) in order for the page to be rendered and accessible from a browser.  But everything to accomplish what you are asking is in that example.

 

0 Kudos