1

I am new to the application development community and I am trying to customize an application created with ArcGIS Web AppBuilder to switch between 2D and 3D views. I have published 2 maps on my ArcGIS Portal, a 2D and a 3D from the same study area. The switch between the two views is easily done using ArcGIS API for JS, but this means that I will have to add all other widgets by myself. As I don't have the time to learn this from scratch, I have built an application using Web AppBuilder and have added one custom widget to it. However, I cannot make the widget work at all and I was wondering if my idea was even possible. Web AppBuilder only works with one map (2D OR 3D), which makes me doubt that I could insert the link to the 3D map at all in my Widget.js file. Did anyone try to do this?

  • Can you post you custom widget source? One map can normally be seen as 2D (MapView) or 3D (SceneView) in the same application. – Below the Radar Nov 02 '18 at 19:21
  • The example code that I'm using operates with two different maps, a 2D and a 3D (https://developers.arcgis.com/javascript/latest/sample-code/views-switch-2d-3d/index.html). In this way, I can avoid having problems with the layers that don't operate in one of the two views. – Stefana Cioban Nov 03 '18 at 15:45
  • Great, so what is your question? – Below the Radar Nov 05 '18 at 12:50
  • How can I bring both maps in the same app in the easiest way possible? I've just learned that creating a widget with Web AppBuilder 2D from ArcGIS will not work as it currently uses the 3.x API while the 3D version uses 4.x. – Stefana Cioban Nov 05 '18 at 14:31
  • You could build 2 different apps, with a toggle button that will load the other app with some parameters like current map extent and current visible layers. However, expect some loading time. Maybe you should not use WebAppBuilder. You will have more control with the Javascript API. – Below the Radar Nov 05 '18 at 14:44
  • If you build two different apps, you can load them into iframes, so both will be loaded at the opening of the page (one can be hidden and the other visible). So toggling between them wont need loading time... – Below the Radar Nov 05 '18 at 14:55
  • Thanks for the advice! I'll give it a try with the iframes and see how it works. The API for JS works pretty nice though, but I have no high hopes of being able to add all the widgets that I would like to in the time that I have left for this project. – Stefana Cioban Nov 11 '18 at 22:04

1 Answers1

1

Update on my issue: It seems that adding a custom widget to switch between views in WAB (developer's edition) is not currently possible.

I've received an answer on my post on the Esri Geonet forum: https://community.esri.com/thread/223878-s-it-possible-to-add-a-custom-widget-to-switch-between-2d-and-3d-view-in-web-appbuilder-developer-edition

"The reason is that WAB 2D currently uses the 3.x API and 3D uses 4.x. The sample in the 4.x samples can switch because it only uses the 4.x API. WAB has yep to solely uses the 4.x API due to all the features that are yet to be implemented. Once the APIs have reached parity then this will be possible."