Implementing 2D-3D switching in WebApps

376
0
09-24-2019 08:55 PM
KuldipSandal1
New Contributor

Hi,

I'm trying to implement the functionality to switch between MapView and SceneView in an app made with the WebApp Builder. 

I have two versions of map application, in 2D and 3D. Currently if one wants to switch over to the 2D/3D version we have to follow a direct url to other app. I came across the Url Button Widget which I'm using. I modified the Javascript code to open the link in the same tab so it acts as sort of a switch button. However, I need to preserve the current extent/zoom levels when swtich between the apps. I first tried URL parameters but soon found that URL parameters do not work for 3D apps. 

I was thinking of writing code into the URL button widget which gets the extent of the current view using the API functions, passes it to a variable which is loaded and used to go to that extent in the switched app by running it at load time automatically. Being not very well versed in JS if anyone could help with the implementation, that'd be amazing.

In the Javascript API 4.x sample code I found this: Switch view from 2D to 3D | ArcGIS API for JavaScript 4.12 

However, I'm not quite sure how to implement and try this in the WebApp Builder Developer edition. 

Any help with this would be much appreciated!

Thanks

0 Kudos
0 Replies